aboutsummaryrefslogtreecommitdiffstats
path: root/src/event (follow)
Commit message (Collapse)AuthorAgeFilesLines
* event/Loop: remove the dummy constructor argumentMax Kellermann2014-02-052-4/+2
|
* copyright year 2014Max Kellermann2014-01-1330-30/+30
|
* event/Loop: allow AddTimer() after Run() has returnedMax Kellermann2014-01-091-1/+3
| | | | Kludge for libavahi-client quirk.
* event/Loop: allow scheduling events before Run()Max Kellermann2014-01-093-5/+29
| | | | | Add the debug-only flag "virgin" which gets checked by assert() calls. Fixes assertion failures when using zeroconf/avahi.
* util/Alloc: new library replacing GLib's g_malloc()Max Kellermann2014-01-071-4/+3
|
* event/Loop: cancel the WakeFD monitor in destructorMax Kellermann2014-01-061-0/+4
|
* event/MultiSocketMonitor: add method ClearSocketList()Max Kellermann2014-01-062-0/+14
|
* event/SocketMonitor: don't close the socket automaticallyMax Kellermann2014-01-066-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.
* event/IdleMonitor: cancel in destructor only if activeMax Kellermann2014-01-061-1/+6
| | | | Debug-mode workaround for bogus assertion failure.
* event/MultiSocketMonitor: API documentationMax Kellermann2014-01-061-0/+10
|
* event/Loop: try to avoid the WakeFD when adding DeferredMonitorMax Kellermann2014-01-052-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.
* event/Loop: combine multiple WakeFD::Write() callsMax Kellermann2014-01-051-1/+6
| | | | Reduce DeferredMonitor overhead.
* event/Loop: add attribute "again"Max Kellermann2014-01-052-2/+10
| | | | Improved support for added events.
* event/Loop: add thread-safety assertionsMax Kellermann2014-01-053-1/+30
|
* event/Loop: remove obsolete assertionMax Kellermann2014-01-051-2/+0
|
* event/Loop: move code to HandleDeferred()Max Kellermann2014-01-052-8/+19
|
* event/MultiSocketMonitor: add missing <algorithm> includeMax Kellermann2014-01-051-0/+2
| | | | For std::find_if().
* event/MultiSocketMonitor: add method ReplaceSocketList()Max Kellermann2014-01-052-0/+42
| | | Move code from AlsaMixerPlugin.
* event/MultiSocketMonitor: include cleanupMax Kellermann2014-01-052-8/+1
|
* event/Loop: remove the GLib implementationMax Kellermann2014-01-0412-664/+3
| | | | | Now that the remaining known bugs in poll() implementation are fixed, we can go on without the GLib implementation.
* event/poll: eliminate one vector::size() callMax Kellermann2014-01-041-2/+3
|
* event/Loop: remove bogus "!quit" assertionMax Kellermann2014-01-041-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.
* event/Loop: remove unused method AddCall()Max Kellermann2014-01-042-28/+0
|
* event/Loop: non-recursive Break() implementationMax Kellermann2014-01-041-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.
* event/BlockingCall: always use DeferredMonitor internallyMax Kellermann2014-01-041-24/+0
| | | | | There is no advantage of using EventLoop::AddCall(), now that DeferredMonitor is thread-safe.
* event/DeferredMonitor: make fully thread-safeMax Kellermann2014-01-044-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().
* event/*Monitor: document as not being thread-safeMax Kellermann2013-12-314-0/+15
|
* event/Loop: document that AddCall() is thread-safeMax Kellermann2013-12-311-0/+5
|
* event/PollGroupPoll: include stddef.h instead of string.hMax Kellermann2013-12-211-1/+2
|
* util/fifo_buffer: remove obsolete libraryMax Kellermann2013-12-191-1/+0
|
* util/PeakBuffer: use IsEmpty() instead of IsNull()Max Kellermann2013-12-191-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.
* util/PeakBuffer: use DynamicFifoBuffer instead of struct fifo_bufferMax Kellermann2013-12-151-1/+0
| | | | Switch to the C++ version.
* util/PeakBuffer: return ConstBuffer<void>Max Kellermann2013-12-151-4/+3
|
* configure.ac: add option "--disable-glib"Max Kellermann2013-12-151-0/+1
| | | | | Allows building without GLib. This fails to compile currently, because GLib is still used in the MPD core.
* system/Resolver: sockaddr_to_string() returns std::string()Max Kellermann2013-12-041-22/+11
| | | | No GLib memory allocation.
* PollGroupWinSelect: delete copy constructor and assignment operatorDenis Krjuchkov2013-12-031-0/+2
|
* PollGroupWinSelect: uninline constructor and destructorDenis Krjuchkov2013-12-032-2/+5
|
* event: add poll() based PollGroup implementationDenis Krjuchkov2013-12-023-0/+156
|
* PollGroupEPoll.hxx: add const modifiers where applicableDenis Krjuchkov2013-11-291-2/+2
|
* event: implement PollGroup based on Windows selectDenis Krjuchkov2013-11-294-0/+330
|
* event: introduce generic API for internal event loopDenis Krjuchkov2013-11-286-55/+147
|
* include cleanup using iwyuMax Kellermann2013-11-289-3/+11
|
* Add infrastructure for using multiple event loopsDenis Krjuchkov2013-11-2713-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.
* event: add API documentationMax Kellermann2013-11-245-1/+38
|
* event/SocketMonitor: add missing spaceMax Kellermann2013-11-242-4/+4
|
* event/FullyBufferedSocket: remove obsolete TODO commentMax Kellermann2013-11-061-16/+0
| | | | We have a better solution now.
* event/FullyBufferedSocket: try to write without extra roundtripMax Kellermann2013-11-062-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.
* event/FullyBufferedSocket: make WriteFromBuffer() protectedMax Kellermann2013-11-062-4/+4
| | | | .. and rename it to Flush().
* event/SocketMonitor: add method Abandon()Max Kellermann2013-11-064-2/+32
|
* event/ServerSocket: don't abort if IPv6 is not availableMax Kellermann2013-11-041-1/+19
| | | | First check if an IPv6 socket can be created.