summaryrefslogtreecommitdiff
path: root/src/event
AgeCommit message (Collapse)Author
2014-12-14event/Loop: read the "again" flag while holding mutexMax Kellermann
2014-11-25event/DeferredMonitor: include cleanupMax Kellermann
2014-11-18Merge tag 'v0.18.18' into v0.19.xMax Kellermann
2014-11-18event/ServerSocket: fix get_remote_uid() error valueMax Kellermann
Must return -1 on error, not 0. 0 is root.
2014-10-10event/IdleMonitor: remove redundant commentMax Kellermann
2014-08-24Merge branch 'v0.18.x'Max Kellermann
2014-08-24event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout()Max Kellermann
The previous commit was broken. D'oh!
2014-08-24Merge branch 'v0.18.x'Max Kellermann
2014-08-24event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()Max Kellermann
The IsActive() method returned true even if the timer was not active, after it completed once. This broke the state file timer, and the state file was not saved periodically.
2014-08-07event/BufferedSocket: fix inversed buffer checkMax Kellermann
This was broken by commit 84d20d9e, which deleted the "!" from the check.
2014-08-07event/BufferedSocket: fix inversed buffer checkMax Kellermann
This was broken by commit 84d20d9e, which deleted the "!" from the check.
2014-08-06util/FifoBuffer: rename to StaticFifoBufferMax Kellermann
2014-04-26DeferredMonitor: fix race condition when using GLib event loopMax Kellermann
Turns out the lock-free code using atomics was not thread-safe. The given callback could be invoked by GLib before the source_id attribute was assigned. This commit changes the DeferredMonitor class to use a Mutex to block the event loop until source_id is assigned. This bug does not exist in the 0.19 branch because it does not use the GLib main loop anymore.
2014-03-15configure.ac: always define _GNU_SOURCE on LinuxMax Kellermann
Make sure glibc gives us all features.
2014-03-02event/SignalMonitor: fix build failure due to missing signal.h includeMax Kellermann
2014-02-18Merge branch 'v0.18.x'Max Kellermann
2014-02-18event/SignalMonitor: unblock signals after forkMax Kellermann
Fixes hanging child process in the "pipe" output plugin.
2014-02-05event/Loop: remove the dummy constructor argumentMax Kellermann
2014-01-13copyright year 2014Max Kellermann
2014-01-09event/Loop: allow AddTimer() after Run() has returnedMax Kellermann
Kludge for libavahi-client quirk.
2014-01-09event/Loop: allow scheduling events before Run()Max Kellermann
Add the debug-only flag "virgin" which gets checked by assert() calls. Fixes assertion failures when using zeroconf/avahi.
2014-01-07util/Alloc: new library replacing GLib's g_malloc()Max Kellermann
2014-01-06event/Loop: cancel the WakeFD monitor in destructorMax Kellermann
2014-01-06event/MultiSocketMonitor: add method ClearSocketList()Max Kellermann
2014-01-06event/SocketMonitor: don't close the socket automaticallyMax Kellermann
Users now have to call Close() explicitly. This simplifies using the class, as most users have automatic socket management already, and Steal() had to be used often.
2014-01-06event/IdleMonitor: cancel in destructor only if activeMax Kellermann
Debug-mode workaround for bogus assertion failure.
2014-01-06event/MultiSocketMonitor: API documentationMax Kellermann
2014-01-05event/Loop: try to avoid the WakeFD when adding DeferredMonitorMax Kellermann
Add a flag that indicates whether the EventLoop is currently "busy". As long as that flag is set, it does not need to be woken up - we can simply add the DeferredMonitor to the list, and it will be caught by EventLoop very soon. This eliminates nearly all of the DeferredMonitor overhead when compared to IdleMonitor, rendering IdleMonitor mostly obsolete.
2014-01-05event/Loop: combine multiple WakeFD::Write() callsMax Kellermann
Reduce DeferredMonitor overhead.
2014-01-05event/Loop: add attribute "again"Max Kellermann
Improved support for added events.
2014-01-05event/Loop: add thread-safety assertionsMax Kellermann
2014-01-05event/Loop: remove obsolete assertionMax Kellermann
2014-01-05event/Loop: move code to HandleDeferred()Max Kellermann
2014-01-05event/MultiSocketMonitor: add missing <algorithm> includeMax Kellermann
For std::find_if().
2014-01-05event/MultiSocketMonitor: add method ReplaceSocketList()Max Kellermann
Move code from AlsaMixerPlugin.
2014-01-05event/MultiSocketMonitor: include cleanupMax Kellermann
2014-01-04event/Loop: remove the GLib implementationMax Kellermann
Now that the remaining known bugs in poll() implementation are fixed, we can go on without the GLib implementation.
2014-01-04event/poll: eliminate one vector::size() callMax Kellermann
2014-01-04event/Loop: remove bogus "!quit" assertionMax Kellermann
Commit 1f11959 allowed modifying the "quit" attribute from any thread, and thus the assertion may fail spuriously. This assertion is too strict for the relaxed use of "quit". Let's remove it and move the "quit" check to before the SockedMonitor::Dispatch() call.
2014-01-04event/Loop: remove unused method AddCall()Max Kellermann
2014-01-04event/Loop: non-recursive Break() implementationMax Kellermann
Simply set the "quit" flag and wake up the thread. This works even if we're inside this thread. Setting "quit" to a new value without mutex protection is usually not safe, but good enough here.
2014-01-04event/BlockingCall: always use DeferredMonitor internallyMax Kellermann
There is no advantage of using EventLoop::AddCall(), now that DeferredMonitor is thread-safe.
2014-01-04event/DeferredMonitor: make fully thread-safeMax Kellermann
Instead of creating a new eventfd for each DeferredMonitor instance, reuse EventLoop's eventfd, and add a std::list to EventLoop that manages the list of pending DeferredMonitors. This std::list is protected by the same mutex as the "calls" list. The bottom line is: reduced overhead because the per-instance eventfd was eliminated, slightly added overhead due to Mutex usage (but negligible), and we're thread-safe now. This subsystem is now good enough to replace EventLoop::AddCall().
2013-12-31event/*Monitor: document as not being thread-safeMax Kellermann
2013-12-31event/Loop: document that AddCall() is thread-safeMax Kellermann
2013-12-21event/PollGroupPoll: include stddef.h instead of string.hMax Kellermann
2013-12-19util/fifo_buffer: remove obsolete libraryMax Kellermann
2013-12-19util/PeakBuffer: use IsEmpty() instead of IsNull()Max Kellermann
The DynamicFifoBuffer methods never return nullptr when the buffer is empty or full; instead, they return an empty buffer. This bug caused an endless loop.
2013-12-15util/PeakBuffer: use DynamicFifoBuffer instead of struct fifo_bufferMax Kellermann
Switch to the C++ version.
2013-12-15util/PeakBuffer: return ConstBuffer<void>Max Kellermann