Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | event/ServerSocket: fix get_remote_uid() error value | Max Kellermann | 2014-11-18 | 1 | -1/+1 |
| | | | | Must return -1 on error, not 0. 0 is root. | ||||
* | event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout() | Max Kellermann | 2014-08-24 | 1 | -1/+1 |
| | | | | The previous commit was broken. D'oh! | ||||
* | event/TimeoutMonitor: reset "active" flag before invoking OnTimeout() | Max Kellermann | 2014-08-24 | 1 | -1/+3 |
| | | | | | | 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. | ||||
* | event/BufferedSocket: fix inversed buffer check | Max Kellermann | 2014-08-07 | 1 | -1/+1 |
| | | | | | This was broken by commit 84d20d9e, which deleted the "!" from the check. | ||||
* | DeferredMonitor: fix race condition when using GLib event loop | Max Kellermann | 2014-04-26 | 2 | -11/+22 |
| | | | | | | | | | 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. | ||||
* | event/SignalMonitor: fix build failure due to missing signal.h include | Max Kellermann | 2014-03-02 | 1 | -0/+2 |
| | |||||
* | event/SignalMonitor: unblock signals after fork | Max Kellermann | 2014-02-18 | 1 | -1/+22 |
| | | | | Fixes hanging child process in the "pipe" output plugin. | ||||
* | 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. | ||||
* | event/Call: signal the calling thread | Max Kellermann | 2013-08-10 | 1 | -0/+5 |
| | | | | Fixes regression from commit 018f4155. | ||||
* | event/IdleMonitor: new monitor class | Max Kellermann | 2013-08-10 | 2 | -0/+130 |
| | |||||
* | event/MultiSocketMonitor: add struct SingleFD | Max Kellermann | 2013-08-10 | 2 | -8/+32 |
| | | | | Prepare for migrating away from GLib. | ||||
* | event/MultiSocketMonitor: use uint64_t instead of gint64 | Max Kellermann | 2013-08-10 | 2 | -5/+6 |
| | | | | Unsigned and portable. | ||||
* | event/MultiSocketMonitor: eliminate virtual method CheckSockets() | Max Kellermann | 2013-08-10 | 2 | -8/+16 |
| | | | | Handle timeout internally. | ||||
* | event/MultiSocketMonitor: PrepareSockets() returns timeout | Max Kellermann | 2013-08-10 | 1 | -2/+5 |
| | | | | Simplify the API, don't use GLib specific integer type. | ||||
* | thread/Id: new class replacing GThread pointers | Max Kellermann | 2013-08-10 | 2 | -8/+9 |
| | | | | Remove a GLib dependencies from class EventLoop and DatabaseLock. | ||||
* | event: add function BlockingCall() | Max Kellermann | 2013-08-08 | 2 | -0/+108 |
| | | | | | Replaces io_thread_call(). This approach is more generic and easier to use due to std::function. | ||||
* | EventLoop: add methodd IsInside() | Max Kellermann | 2013-08-08 | 2 | -2/+26 |
| | | | | | Track which thread runs the EventLoop and provide a check whether we're currently inside. | ||||
* | EventLoop: un-inline Run() and others | Max Kellermann | 2013-08-08 | 2 | -22/+61 |
| | | | | Prepare for adding more code. | ||||
* | event/*Monitor: add method GetEventLoop() | Max Kellermann | 2013-08-08 | 4 | -1/+16 |
| | |||||
* | event/SocketMonitor: un-inline Schedule() | Max Kellermann | 2013-08-08 | 2 | -24/+23 |
| | | | | Merge with CommitEventFlags(). | ||||
* | event/SocketMonitor: add assertions | Max Kellermann | 2013-08-08 | 2 | -0/+12 |
| | |||||
* | event/BufferedSocket: add missing include | Max Kellermann | 2013-08-08 | 1 | -0/+1 |
| | |||||
* | event/DeferredMonitor: rename Run() to RunDeferred() | Max Kellermann | 2013-08-07 | 2 | -4/+4 |
| | |||||
* | event/DeferredMonitor: use EventLoop::AddIdle() | Max Kellermann | 2013-08-07 | 2 | -3/+7 |
| | |||||
* | event/DeferredMonitor: new class wrapping g_idle_add() | Max Kellermann | 2013-08-07 | 2 | -0/+109 |
| | |||||
* | event/EventFD: move to libsystem | Max Kellermann | 2013-08-07 | 5 | -361/+2 |
| | |||||
* | event/SignalMonitor: use signalfd() if available | Max Kellermann | 2013-08-07 | 1 | -1/+72 |
| | |||||
* | SignalHandlers: move code to new class SignalMonitor | Max Kellermann | 2013-08-07 | 2 | -0/+197 |
| | |||||
* | event/Event{Pipe,FD}: auto-create in constructor | Max Kellermann | 2013-08-07 | 4 | -59/+23 |
| | | | | Errors are fatal now. This makes the class a lot easier to use. | ||||
* | Makefile.am: move sources to libsystem.a | Max Kellermann | 2013-08-07 | 7 | -10/+10 |
| |