Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | event/MultiSocketMonitor: add missing <algorithm> include | Max Kellermann | 2014-01-05 | 1 | -0/+2 |
| | | | | For std::find_if(). | ||||
* | event/MultiSocketMonitor: add method ReplaceSocketList() | Max Kellermann | 2014-01-05 | 2 | -0/+42 |
| | | | Move code from AlsaMixerPlugin. | ||||
* | event/MultiSocketMonitor: include cleanup | Max Kellermann | 2014-01-05 | 2 | -8/+1 |
| | |||||
* | event/Loop: remove the GLib implementation | Max Kellermann | 2014-01-04 | 12 | -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() call | Max Kellermann | 2014-01-04 | 1 | -2/+3 |
| | |||||
* | event/Loop: remove bogus "!quit" assertion | Max Kellermann | 2014-01-04 | 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. | ||||
* | event/Loop: remove unused method AddCall() | Max Kellermann | 2014-01-04 | 2 | -28/+0 |
| | |||||
* | event/Loop: non-recursive Break() implementation | Max Kellermann | 2014-01-04 | 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. | ||||
* | event/BlockingCall: always use DeferredMonitor internally | Max Kellermann | 2014-01-04 | 1 | -24/+0 |
| | | | | | There is no advantage of using EventLoop::AddCall(), now that DeferredMonitor is thread-safe. | ||||
* | event/DeferredMonitor: make fully thread-safe | Max Kellermann | 2014-01-04 | 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(). | ||||
* | event/*Monitor: document as not being thread-safe | Max Kellermann | 2013-12-31 | 4 | -0/+15 |
| | |||||
* | event/Loop: document that AddCall() is thread-safe | Max Kellermann | 2013-12-31 | 1 | -0/+5 |
| | |||||
* | event/PollGroupPoll: include stddef.h instead of string.h | Max Kellermann | 2013-12-21 | 1 | -1/+2 |
| | |||||
* | util/fifo_buffer: remove obsolete library | Max Kellermann | 2013-12-19 | 1 | -1/+0 |
| | |||||
* | util/PeakBuffer: use IsEmpty() instead of IsNull() | Max Kellermann | 2013-12-19 | 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. | ||||
* | util/PeakBuffer: use DynamicFifoBuffer instead of struct fifo_buffer | Max Kellermann | 2013-12-15 | 1 | -1/+0 |
| | | | | Switch to the C++ version. | ||||
* | util/PeakBuffer: return ConstBuffer<void> | Max Kellermann | 2013-12-15 | 1 | -4/+3 |
| | |||||
* | configure.ac: add option "--disable-glib" | Max Kellermann | 2013-12-15 | 1 | -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 Kellermann | 2013-12-04 | 1 | -22/+11 |
| | | | | No GLib memory allocation. | ||||
* | PollGroupWinSelect: delete copy constructor and assignment operator | Denis Krjuchkov | 2013-12-03 | 1 | -0/+2 |
| | |||||
* | PollGroupWinSelect: uninline constructor and destructor | Denis Krjuchkov | 2013-12-03 | 2 | -2/+5 |
| | |||||
* | event: add poll() based PollGroup implementation | Denis Krjuchkov | 2013-12-02 | 3 | -0/+156 |
| | |||||
* | PollGroupEPoll.hxx: add const modifiers where applicable | Denis Krjuchkov | 2013-11-29 | 1 | -2/+2 |
| | |||||
* | event: implement PollGroup based on Windows select | Denis Krjuchkov | 2013-11-29 | 4 | -0/+330 |
| | |||||
* | event: introduce generic API for internal event loop | Denis Krjuchkov | 2013-11-28 | 6 | -55/+147 |
| | |||||
* | include cleanup using iwyu | Max Kellermann | 2013-11-28 | 9 | -3/+11 |
| | |||||
* | Add infrastructure for using multiple event loops | Denis Krjuchkov | 2013-11-27 | 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. | ||||
* | event: add API documentation | Max Kellermann | 2013-11-24 | 5 | -1/+38 |
| | |||||
* | event/SocketMonitor: add missing space | Max Kellermann | 2013-11-24 | 2 | -4/+4 |
| | |||||
* | event/FullyBufferedSocket: remove obsolete TODO comment | Max Kellermann | 2013-11-06 | 1 | -16/+0 |
| | | | | We have a better solution now. | ||||
* | event/FullyBufferedSocket: try to write without extra roundtrip | Max Kellermann | 2013-11-06 | 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. | ||||
* | event/FullyBufferedSocket: make WriteFromBuffer() protected | Max Kellermann | 2013-11-06 | 2 | -4/+4 |
| | | | | .. and rename it to Flush(). | ||||
* | event/SocketMonitor: add method Abandon() | Max Kellermann | 2013-11-06 | 4 | -2/+32 |
| | |||||
* | event/ServerSocket: don't abort if IPv6 is not available | Max Kellermann | 2013-11-04 | 1 | -1/+19 |
| | | | | First check if an IPv6 socket can be created. | ||||
* | event/ServerSocket: fix assertion failure | Max Kellermann | 2013-11-04 | 1 | -1/+1 |
| | | | | Regression from previous commit. D'oh! | ||||
* | event/ServerSocket: open sockets in the order they were configured | Max Kellermann | 2013-11-04 | 2 | -5/+5 |
| | | | | Use a std::list which can be appended at the end. | ||||
* | *: use nullptr instead of NULL | Max Kellermann | 2013-10-28 | 2 | -4/+4 |
| | |||||
* | event/ServerSocket: pass AllocatedPath to AddPath() | Max Kellermann | 2013-10-19 | 2 | -14/+18 |
| | |||||
* | SignalMonitor: add SignalMonitorGetEventLoop() | Max Kellermann | 2013-10-18 | 2 | -0/+15 |
| | | | | Eliminate the global variable "shutdown_loop". | ||||
* | event/BufferedSocket: pass writable pointer to OnSocketInput() | Max Kellermann | 2013-10-15 | 1 | -1/+9 |
| | | | | | Remove the const_cast from HttpdClient.cxx, and avoid one allocation in ClientRead.cxx. | ||||
* | util/FifoBuffer: C++ version of the fifo_buffer library | Max Kellermann | 2013-10-15 | 2 | -44/+21 |
| | |||||
* | system/clock: convert to C++ | Max Kellermann | 2013-10-15 | 1 | -4/+4 |
| | |||||
* | require GLib 2.28 | Max Kellermann | 2013-10-15 | 1 | -2/+0 |
| | | | | The header glib_compat.h is now obsolete and can be removed. | ||||
* | gcc.h: rename to Compiler.h | Max Kellermann | 2013-10-15 | 8 | -8/+8 |
| | |||||
* | Log: new logging library API | Max Kellermann | 2013-10-02 | 1 | -11/+12 |
| | | | | | Prepare to migrate away from GLib. Currently, we're still using GLib as a backend. | ||||
* | system/SocketError: un-inline constructor | Max Kellermann | 2013-09-04 | 1 | -0/+2 |
| | | | | Reduces header dependencies. | ||||
* | util/Error: new error passing library | Max Kellermann | 2013-09-04 | 5 | -54/+56 |
| | | | | Replaces GLib's GError. | ||||
* | system/resolver: convert to C++ | Max Kellermann | 2013-09-04 | 1 | -1/+1 |
| | |||||
* | EventLoop: initialise the thread id explicitly | Max Kellermann | 2013-08-10 | 1 | -1/+2 |
| | |||||
* | EventLoop: new implementation using epoll | Max Kellermann | 2013-08-10 | 13 | -16/+705 |
| | | | | Implement an event loop without GLib. |