summaryrefslogtreecommitdiff
path: root/src/event
AgeCommit message (Collapse)Author
2019-06-17Copyright year 2019Max Kellermann
2019-05-29thread/Slack: use std::chrono::durationMax Kellermann
2019-05-23{event,output}/Thread: downgrade realtime scheduling errors to "info"Max Kellermann
These messages can be confusing, but they are not critical.
2019-05-07event/Call, ...: use wait() with predicateMax Kellermann
2019-04-26thread/Cond: add wait() overload which takes a unique_lock<>Max Kellermann
Just like std::condition_variable, which however has no way to specify the std::mutex directly.
2019-04-25thread/*Cond: rename methods to match std::condition_variableMax Kellermann
2019-04-25event/Call: use std::lock_guardMax Kellermann
2019-04-25event/Call: use std::lock_guardMax Kellermann
2019-04-04event/*, ...: make GetEventLoop() constMax Kellermann
2019-04-04event/MaskMonitor: add `noexcept`Max Kellermann
2019-04-04Merge branch 'v0.21.x'Max Kellermann
2019-04-04event/SocketMonitor: don't cancel if OnSocketReady() returns falseMax Kellermann
Expect OnSocketReady() to cancel events. If it returns false, the SocketMonitor may be destructed already. This fixes a use-after-free bug in the "httpd" output plugin.
2019-04-04event/{Fully,}BufferedSocket: add more API documentationMax Kellermann
2019-04-03client: make GetEventLoop() publicMax Kellermann
2019-03-20event/ServerSocket: runtime error if abstract sockets are unavailableMax Kellermann
2019-03-20event/ServerSocket: add HAVE_UN check to AddAbstract()Max Kellermann
Closes https://github.com/MusicPlayerDaemon/MPD/issues/510
2019-03-20event/ServerSocket, doc, ...: refer to AF_LOCAL as "local socket"Max Kellermann
.. and not "UNIX domain socket. Be consistent about the naming.
2019-02-25event/ServerSocket, config/Net: abstract socket supportMax Kellermann
2019-02-05event/Loop: add flag `alive`Max Kellermann
This replaces the old `dead` flag which was unreliable; it was `false` if the EventThread was not yet started, which could cause deadlocks in BlockingCall().
2018-12-09Add boost_dep in subdir meson.build filesJacob Vosmaer
2018-11-19check.h: remove obsolete headerMax Kellermann
Since we switched from autotools to Meson in commit 94592c14062d5afc9482d11baa401648082022c0, we don't need to include `config.h` early to properly enable large file support. Meson passes the required macros on the compiler command line instead of defining them in `config.h`. This means we can include `config.h` at any time, whenever we want to check its macros, and there are no ordering constraints.
2018-11-14event/Thread: reduce the RTIO timer slack to 10usMax Kellermann
MPD's default is 100ms, which is too long for the real-time I/O thread. The OutputThread has 100us, but the real-time I/O thread might have tighter deadlines. This change has currently no effect (I believe), because nobody uses timers on the RTIO thread.
2018-11-11events/MultiSocketMonitor: add method ForEachResult()Max Kellermann
2018-10-31*: copyright year 2018Max Kellermann
2018-10-30event/ServerSocket: allow mixing AddFD() with other Add*() methodsMax Kellermann
2018-10-30event/ServerSocket: add AddFD() overload with AllocatedSocketAddress&&Max Kellermann
2018-10-30event/ServerSocket: make AddAddress() a templateMax Kellermann
2018-10-30event/ServerSocket: include cleanupMax Kellermann
2018-10-30event/ServerSocket: use class IPv6AddressMax Kellermann
2018-10-30event/ServerSocket: make OneServerSocket an inner classMax Kellermann
2018-10-30event/ServerSocket: make OnAccept() noexceptMax Kellermann
2018-10-30event/ServerSocket: use C++11 initializerMax Kellermann
2018-10-30event/ServerSocket: pass UniqueSocketDescriptor to AddFD()Max Kellermann
2018-10-30event/ServerSocket: add `noexcept`Max Kellermann
2018-10-14build with Meson instead of autotoolsMax Kellermann
So long, autotools! This is my last MPD related project to migrate away from it. It has its strengths, but also very obvious weaknesses and weirdnesses. Today, many of its quirks are not needed anymore, and are cumbersome and slow. Now welcome our new Meson overlords!
2018-08-22system/EPollFD: rename to EpollFDMax Kellermann
2018-08-21net/Resolver: replace with more advanced implementationMax Kellermann
The new implementation is copied from another project and is BSD-licensed. It is exception-safe and can parse IPv6 scope ids with interface names.
2018-08-20Compiler.h: move to util/Max Kellermann
2018-08-14fixed setting unix socket permissions1848
first call fchmod() to prevent TOCTTOU, then apply permissions using chmod()
2018-08-09event/ServerSocket: fix get_remote_uid() callMax Kellermann
This call was broken since commit 9a5bcc6db0c58459b63d25fede1945b7ebef67a8 because the `UniqueSocketDescriptor` had already been moved.
2018-08-07Moved call to fchmod() on socket from OneServerSocket::Open() to ↵1848
socket_bind_listen()
2018-08-07Use fchmod instead of chmod for unix sockets to prevent TOCTTOU1848
2018-08-06event/SignalMonitor: make SignalMonitorFinish() noexceptMax Kellermann
2018-08-06event/SignalMonitor: add `noexcept`Max Kellermann
2018-08-06system/SignalFD: throw exception on errorMax Kellermann
2018-08-06system/Event{FD,Pipe}: throw exception on errorMax Kellermann
2018-07-15event/ServerSocket: add method IsEmpty()Max Kellermann
2018-02-16output/alsa: use a new I/O thread with real-time schedulingMax Kellermann
The normal I/O event thread can have a large latency, e.g. when libgnutls loads all TLS CA certificates for a https connect. This makes it unreliable for the ALSA I/O notifications, and causes ring buffer xruns. To avoid interfering with high latency events such as CURL's, we move the ALSA I/O events to a separate I/O thread which also obtains real-time scheduling (if possible). Closes #221
2018-01-29event/Thread: add "noexcept"Max Kellermann
2018-01-29event/Call: invoke function directly if the EventLoop is deadMax Kellermann
Works around a deadlock bug which happens when waiting for an EventLoop which isn't running anymore.