Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2014-01-13 | copyright year 2014 | Max Kellermann | 30 | -30/+30 | |
2014-01-09 | event/Loop: allow AddTimer() after Run() has returned | Max Kellermann | 1 | -1/+3 | |
Kludge for libavahi-client quirk. | |||||
2014-01-09 | event/Loop: allow scheduling events before Run() | Max Kellermann | 3 | -5/+29 | |
Add the debug-only flag "virgin" which gets checked by assert() calls. Fixes assertion failures when using zeroconf/avahi. | |||||
2014-01-07 | util/Alloc: new library replacing GLib's g_malloc() | Max Kellermann | 1 | -4/+3 | |
2014-01-06 | event/Loop: cancel the WakeFD monitor in destructor | Max Kellermann | 1 | -0/+4 | |
2014-01-06 | event/MultiSocketMonitor: add method ClearSocketList() | Max Kellermann | 2 | -0/+14 | |
2014-01-06 | event/SocketMonitor: don't close the socket automatically | Max Kellermann | 6 | -14/+8 | |
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-06 | event/IdleMonitor: cancel in destructor only if active | Max Kellermann | 1 | -1/+6 | |
Debug-mode workaround for bogus assertion failure. | |||||
2014-01-06 | event/MultiSocketMonitor: API documentation | Max Kellermann | 1 | -0/+10 | |
2014-01-05 | event/Loop: try to avoid the WakeFD when adding DeferredMonitor | Max Kellermann | 2 | -2/+24 | |
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-05 | event/Loop: combine multiple WakeFD::Write() calls | Max Kellermann | 1 | -1/+6 | |
Reduce DeferredMonitor overhead. | |||||
2014-01-05 | event/Loop: add attribute "again" | Max Kellermann | 2 | -2/+10 | |
Improved support for added events. | |||||
2014-01-05 | event/Loop: add thread-safety assertions | Max Kellermann | 3 | -1/+30 | |
2014-01-05 | event/Loop: remove obsolete assertion | Max Kellermann | 1 | -2/+0 | |
2014-01-05 | event/Loop: move code to HandleDeferred() | Max Kellermann | 2 | -8/+19 | |
2014-01-05 | event/MultiSocketMonitor: add missing <algorithm> include | Max Kellermann | 1 | -0/+2 | |
For std::find_if(). | |||||
2014-01-05 | event/MultiSocketMonitor: add method ReplaceSocketList() | Max Kellermann | 2 | -0/+42 | |
Move code from AlsaMixerPlugin. | |||||
2014-01-05 | event/MultiSocketMonitor: include cleanup | Max Kellermann | 2 | -8/+1 | |
2014-01-04 | event/Loop: remove the GLib implementation | Max Kellermann | 12 | -664/+3 | |
Now that the remaining known bugs in poll() implementation are fixed, we can go on without the GLib implementation. | |||||
2014-01-04 | event/poll: eliminate one vector::size() call | Max Kellermann | 1 | -2/+3 | |
2014-01-04 | event/Loop: remove bogus "!quit" assertion | Max Kellermann | 1 | -5/+3 | |
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-04 | event/Loop: remove unused method AddCall() | Max Kellermann | 2 | -28/+0 | |
2014-01-04 | event/Loop: non-recursive Break() implementation | Max Kellermann | 1 | -4/+2 | |
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-04 | event/BlockingCall: always use DeferredMonitor internally | Max Kellermann | 1 | -24/+0 | |
There is no advantage of using EventLoop::AddCall(), now that DeferredMonitor is thread-safe. | |||||
2014-01-04 | event/DeferredMonitor: make fully thread-safe | Max Kellermann | 4 | -54/+77 | |
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-31 | event/*Monitor: document as not being thread-safe | Max Kellermann | 4 | -0/+15 | |
2013-12-31 | event/Loop: document that AddCall() is thread-safe | Max Kellermann | 1 | -0/+5 | |
2013-12-21 | event/PollGroupPoll: include stddef.h instead of string.h | Max Kellermann | 1 | -1/+2 | |
2013-12-19 | util/fifo_buffer: remove obsolete library | Max Kellermann | 1 | -1/+0 | |
2013-12-19 | util/PeakBuffer: use IsEmpty() instead of IsNull() | Max Kellermann | 1 | -1/+1 | |
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-15 | util/PeakBuffer: use DynamicFifoBuffer instead of struct fifo_buffer | Max Kellermann | 1 | -1/+0 | |
Switch to the C++ version. | |||||
2013-12-15 | util/PeakBuffer: return ConstBuffer<void> | Max Kellermann | 1 | -4/+3 | |
2013-12-15 | configure.ac: add option "--disable-glib" | Max Kellermann | 1 | -0/+1 | |
Allows building without GLib. This fails to compile currently, because GLib is still used in the MPD core. | |||||
2013-12-04 | system/Resolver: sockaddr_to_string() returns std::string() | Max Kellermann | 1 | -22/+11 | |
No GLib memory allocation. | |||||
2013-12-03 | PollGroupWinSelect: delete copy constructor and assignment operator | Denis Krjuchkov | 1 | -0/+2 | |
2013-12-03 | PollGroupWinSelect: uninline constructor and destructor | Denis Krjuchkov | 2 | -2/+5 | |
2013-12-02 | event: add poll() based PollGroup implementation | Denis Krjuchkov | 3 | -0/+156 | |
2013-11-29 | PollGroupEPoll.hxx: add const modifiers where applicable | Denis Krjuchkov | 1 | -2/+2 | |
2013-11-29 | event: implement PollGroup based on Windows select | Denis Krjuchkov | 4 | -0/+330 | |
2013-11-28 | event: introduce generic API for internal event loop | Denis Krjuchkov | 6 | -55/+147 | |
2013-11-28 | include cleanup using iwyu | Max Kellermann | 9 | -3/+11 | |
2013-11-27 | Add infrastructure for using multiple event loops | Denis Krjuchkov | 13 | -113/+215 | |
This change adds two configuration options: --with-eventloop=[glib|internal|auto] --with-pollmethod=[epoll|auto] First allows switching between GLib event loop and internal one. Second chooses backend to use for internal event loop. Conditional compilation symbols are changed accordingly. Additional helper macro MPD_OPTIONAL_FUNC_NODEF is added as well. | |||||
2013-11-24 | event: add API documentation | Max Kellermann | 5 | -1/+38 | |
2013-11-24 | event/SocketMonitor: add missing space | Max Kellermann | 2 | -4/+4 | |
2013-11-06 | event/FullyBufferedSocket: remove obsolete TODO comment | Max Kellermann | 1 | -16/+0 | |
We have a better solution now. | |||||
2013-11-06 | event/FullyBufferedSocket: try to write without extra roundtrip | Max Kellermann | 2 | -17/+33 | |
Postpone the write using IdleMonitor instead of scheduling a write event. This reduces the number of system calls, because we don't need to register and unregister the write event in epoll. | |||||
2013-11-06 | event/FullyBufferedSocket: make WriteFromBuffer() protected | Max Kellermann | 2 | -4/+4 | |
.. and rename it to Flush(). | |||||
2013-11-06 | event/SocketMonitor: add method Abandon() | Max Kellermann | 4 | -2/+32 | |
2013-11-04 | event/ServerSocket: don't abort if IPv6 is not available | Max Kellermann | 1 | -1/+19 | |
First check if an IPv6 socket can be created. | |||||
2013-11-04 | event/ServerSocket: fix assertion failure | Max Kellermann | 1 | -1/+1 | |
Regression from previous commit. D'oh! |