- 23 Nov, 2021 1 commit
-
-
Rosen Penev authored
Signed-off-by:
Rosen Penev <rosenp@gmail.com>
-
- 12 Nov, 2021 2 commits
-
-
Rosen Penev authored
Signed-off-by:
Rosen Penev <rosenp@gmail.com>
-
Rosen Penev authored
SonarLint reports the latter to be better: std::scoped_lock basically provides the same feature as std::lock_guard, but is more generic: It can lock several mutexes at the same time, with a deadlock prevention mechanism (see {rule:cpp:S5524}). The equivalent code to perform simultaneous locking with std::lock_guard is significantly more complex. Therefore, it is simpler to use std::scoped_lock all the time, even when locking only one mutex (there will be no performance impact). Signed-off-by:
Rosen Penev <rosenp@gmail.com>
-
- 03 Nov, 2021 1 commit
-
-
Max Kellermann authored
Fixes assertion failure when the EventLoop gets destructed before Run() was ever called. Fixes https://bugs.debian.org/998310
-
- 20 Oct, 2021 1 commit
-
-
Max Kellermann authored
Currently fails in class NfsFileReader due to https://github.com/MusicPlayerDaemon/MPD/issues/1298
-
- 19 Oct, 2021 1 commit
-
-
Max Kellermann authored
-
- 13 Oct, 2021 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
- 10 Sep, 2021 1 commit
-
-
Max Kellermann authored
Allow DeferredEvents to call EventLoop::Break().
-
- 24 Jun, 2021 1 commit
-
-
Max Kellermann authored
-
- 02 Mar, 2021 1 commit
-
-
Max Kellermann authored
This reduces delays of zero-duration timers from up to 1 second to zero. libavahi-client schedules zero-duration timers often.
-
- 22 Feb, 2021 2 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
- 17 Feb, 2021 1 commit
-
-
Max Kellermann authored
-
- 12 Feb, 2021 1 commit
-
-
Max Kellermann authored
-
- 05 Feb, 2021 8 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
... and make TimerEvent a type alias for FineTimerEvent (i.e. swap names).
-
Max Kellermann authored
Preparing for a variant of TimerEvent with coarse 1-second granularity, but cheaper (with a timer wheel).
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
- 21 Jan, 2021 3 commits
-
-
Max Kellermann authored
Fixes Windows compatibility.
-
Max Kellermann authored
-
Max Kellermann authored
Regression by commit cd4b673b Closes https://github.com/MusicPlayerDaemon/MPD/issues/1060
-
- 12 Jan, 2021 1 commit
-
-
Max Kellermann authored
If an InjectEvent callback schedules a timer, the loop will restart, but the "busy" flag is still false. The fix is to move the "again" check before the "busy" setting.
-
- 11 Jan, 2021 4 commits
-
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
- 01 Jan, 2021 1 commit
-
-
Max Kellermann authored
-
- 04 Dec, 2020 6 commits
-
-
arcnmx authored
SocketEvent knows the FD is still open and is about to close it, so it's unnecessary to rely on the kernel (via AbandonFD) to clean up the epoll_wait list. ### Why this is relevant - `AbandonFD` assumes that upon closing the socket, the FD will be automatically removed from the epoll list. That fd is associated with a reference to the `SocketEvent`, so this is an important and dangerous assumption to get wrong. In the case that the FD isn't immediately removed from the list by the kernel, the event loop can crash due to the `SocketEvent` being destroyed and it being a use-after-free bug at that point. - If a socket FD happens to be duplicated, then closing the SocketEvent FD will not automatically remove it from epoll, and will trigger said bug/crash. It is only automatically removed when all FD references to the underlying socket/resource are closed? - A `fork()` is one example where a socket FD can be duplicated and result in this situation. - `CLOEXEC` might be considered mitigation for this but also introduces a race condition where the crash can occur between a `fork()` and `exec()` without additional synchronization to freeze the event loop. One could argue the mpd event loop isn't fork-safe, and thus should be allowed to use `AbandonFD` however it likes. A decision on whether this is intended should probably be declared; but either way this fix seems appropriate in cases where `Abandon` isn't actually necessary. It also might be possible to fix `AbandonFD` to mark the `SocketEvent` as removed without using `EPOLL_CTL_DEL`? [edit: made this dependent on HAVE_THREADED_EVENT_LOOP which is always true for MPD, but not for ncmpc, for example - mk]
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
-
Max Kellermann authored
Relax the API (instead of tightening it further like commit 7bc1c992 tried to do unsuccessfully).
-
- 02 Dec, 2020 2 commits
-
-
Max Kellermann authored
This reverts commit 7bc1c992. It caused a crash with the ALSA plugin family (through MultiSocketMonitor::ReplaceSocketList() and MultiSocketMonitor::AddSocket()). Until we have a proper fix, the assertion patch is reverted. Closes https://github.com/MusicPlayerDaemon/MPD/issues/1020
-
Max Kellermann authored
-