aboutsummaryrefslogtreecommitdiffstats
path: root/src/event (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-11-18event/ServerSocket: fix get_remote_uid() error valueMax Kellermann1-1/+1
Must return -1 on error, not 0. 0 is root.
2014-08-24event/TimeoutMonitor: really reset "active" flag before invoking OnTimeout()Max Kellermann1-1/+1
The previous commit was broken. D'oh!
2014-08-24event/TimeoutMonitor: reset "active" flag before invoking OnTimeout()Max Kellermann1-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.
2014-08-07event/BufferedSocket: fix inversed buffer checkMax Kellermann1-1/+1
This was broken by commit 84d20d9e, which deleted the "!" from the check.
2014-04-26DeferredMonitor: fix race condition when using GLib event loopMax Kellermann2-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.
2014-03-02event/SignalMonitor: fix build failure due to missing signal.h includeMax Kellermann1-0/+2
2014-02-18event/SignalMonitor: unblock signals after forkMax Kellermann1-1/+22
Fixes hanging child process in the "pipe" output plugin.
2013-11-06event/FullyBufferedSocket: remove obsolete TODO commentMax Kellermann1-16/+0
We have a better solution now.
2013-11-06event/FullyBufferedSocket: try to write without extra roundtripMax Kellermann2-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-06event/FullyBufferedSocket: make WriteFromBuffer() protectedMax Kellermann2-4/+4
.. and rename it to Flush().
2013-11-06event/SocketMonitor: add method Abandon()Max Kellermann4-2/+32
2013-11-04event/ServerSocket: don't abort if IPv6 is not availableMax Kellermann1-1/+19
First check if an IPv6 socket can be created.
2013-11-04event/ServerSocket: fix assertion failureMax Kellermann1-1/+1
Regression from previous commit. D'oh!
2013-11-04event/ServerSocket: open sockets in the order they were configuredMax Kellermann2-5/+5
Use a std::list which can be appended at the end.
2013-10-28*: use nullptr instead of NULLMax Kellermann2-4/+4
2013-10-19event/ServerSocket: pass AllocatedPath to AddPath()Max Kellermann2-14/+18
2013-10-18SignalMonitor: add SignalMonitorGetEventLoop()Max Kellermann2-0/+15
Eliminate the global variable "shutdown_loop".
2013-10-15event/BufferedSocket: pass writable pointer to OnSocketInput()Max Kellermann1-1/+9
Remove the const_cast from HttpdClient.cxx, and avoid one allocation in ClientRead.cxx.
2013-10-15util/FifoBuffer: C++ version of the fifo_buffer libraryMax Kellermann2-44/+21
2013-10-15system/clock: convert to C++Max Kellermann1-4/+4
2013-10-15require GLib 2.28Max Kellermann1-2/+0
The header glib_compat.h is now obsolete and can be removed.
2013-10-15gcc.h: rename to Compiler.hMax Kellermann8-8/+8
2013-10-02Log: new logging library APIMax Kellermann1-11/+12
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
2013-09-04system/SocketError: un-inline constructorMax Kellermann1-0/+2
Reduces header dependencies.
2013-09-04util/Error: new error passing libraryMax Kellermann5-54/+56
Replaces GLib's GError.
2013-09-04system/resolver: convert to C++Max Kellermann1-1/+1
2013-08-10EventLoop: initialise the thread id explicitlyMax Kellermann1-1/+2
2013-08-10EventLoop: new implementation using epollMax Kellermann13-16/+705
Implement an event loop without GLib.
2013-08-10event/Call: signal the calling threadMax Kellermann1-0/+5
Fixes regression from commit 018f4155.
2013-08-10event/IdleMonitor: new monitor classMax Kellermann2-0/+130
2013-08-10event/MultiSocketMonitor: add struct SingleFDMax Kellermann2-8/+32
Prepare for migrating away from GLib.
2013-08-10event/MultiSocketMonitor: use uint64_t instead of gint64Max Kellermann2-5/+6
Unsigned and portable.
2013-08-10event/MultiSocketMonitor: eliminate virtual method CheckSockets()Max Kellermann2-8/+16
Handle timeout internally.
2013-08-10event/MultiSocketMonitor: PrepareSockets() returns timeoutMax Kellermann1-2/+5
Simplify the API, don't use GLib specific integer type.
2013-08-10thread/Id: new class replacing GThread pointersMax Kellermann2-8/+9
Remove a GLib dependencies from class EventLoop and DatabaseLock.
2013-08-08event: add function BlockingCall()Max Kellermann2-0/+108
Replaces io_thread_call(). This approach is more generic and easier to use due to std::function.
2013-08-08EventLoop: add methodd IsInside()Max Kellermann2-2/+26
Track which thread runs the EventLoop and provide a check whether we're currently inside.
2013-08-08EventLoop: un-inline Run() and othersMax Kellermann2-22/+61
Prepare for adding more code.
2013-08-08event/*Monitor: add method GetEventLoop()Max Kellermann4-1/+16
2013-08-08event/SocketMonitor: un-inline Schedule()Max Kellermann2-24/+23
Merge with CommitEventFlags().
2013-08-08event/SocketMonitor: add assertionsMax Kellermann2-0/+12
2013-08-08event/BufferedSocket: add missing includeMax Kellermann1-0/+1
2013-08-07event/DeferredMonitor: rename Run() to RunDeferred()Max Kellermann2-4/+4
2013-08-07event/DeferredMonitor: use EventLoop::AddIdle()Max Kellermann2-3/+7
2013-08-07event/DeferredMonitor: new class wrapping g_idle_add()Max Kellermann2-0/+109
2013-08-07event/EventFD: move to libsystemMax Kellermann5-361/+2
2013-08-07event/SignalMonitor: use signalfd() if availableMax Kellermann1-1/+72
2013-08-07SignalHandlers: move code to new class SignalMonitorMax Kellermann2-0/+197
2013-08-07event/Event{Pipe,FD}: auto-create in constructorMax Kellermann4-59/+23
Errors are fatal now. This makes the class a lot easier to use.
2013-08-07Makefile.am: move sources to libsystem.aMax Kellermann7-10/+10