Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | lib: All settings use configured namespace | Tobias Brunner | 2014-02-12 | 1 | -1/+1 |
| | |||||
* | watcher: Don't complain if select() syscall got interrupted | Martin Willi | 2014-01-22 | 1 | -1/+1 |
| | |||||
* | watcher: Rebuild fdset when select() fails | Martin Willi | 2013-10-24 | 1 | -1/+12 |
| | | | | | | This should make sure we refresh the fdset if a user closes an FD it just removed. Some selects() seem to complain about the bad FD before signaling the notification pipe. | ||||
* | watcher: Made notify array initialization compatible with older GCC versions | Tobias Brunner | 2013-07-25 | 1 | -2/+1 |
| | |||||
* | processor: force synchronous execute_job() if set_threads(0) has been called | Martin Willi | 2013-07-19 | 1 | -1/+1 |
| | | | | | | During daemon shutdown, some idle threads might be lingering around even if set_threads(0) already has been called. To avoid any races, we enforce synchronous execution of the job. | ||||
* | Fix various API doc issues and typos | Tobias Brunner | 2013-07-18 | 1 | -1/+1 |
| | | | | Partially based on an old patch by Adrian-Ken Rueegsegger. | ||||
* | processor: remove the now unused get_threads() method again | Martin Willi | 2013-07-18 | 2 | -17/+0 |
| | |||||
* | watcher: use processors new execute_job() to notify FDs | Martin Willi | 2013-07-18 | 1 | -9/+1 |
| | | | | | Just queueing is problematic, as all threads might be busy waiting for events that the queued (but never executed) job delivers. | ||||
* | processor: add an execute_job() method to directly execute an important job | Martin Willi | 2013-07-18 | 2 | -0/+36 |
| | | | | | | | If all worker threads are busy and waiting for an event, we must ensure that a job delivering that event gets executed. This new method has this property for CRITICAL jobs, using a worker if we have one, but executing the job directly if not. | ||||
* | watcher: properly support multiple watch callback types for the same FD | Martin Willi | 2013-07-18 | 2 | -36/+45 |
| | |||||
* | watcher: read multiple notifications if available | Martin Willi | 2013-07-18 | 1 | -2/+15 |
| | | | | | Use non-blocking I/O on the read end of the notify pipe. This also makes sure the read does not block should select() signal data while there is none. | ||||
* | watcher: add some debugging statements | Martin Willi | 2013-07-18 | 1 | -0/+12 |
| | |||||
* | watcher: if the processor has no threads, execute the job with watcher thread | Martin Willi | 2013-07-18 | 1 | -11/+19 |
| | | | | | This is important during shutdown, where we might need to signal some FDs while all idle threads are gone already. | ||||
* | processor: add a getter for the threads passed to set_threads() | Martin Willi | 2013-07-18 | 2 | -1/+17 |
| | |||||
* | watcher: unregister a watcher FD if its thread gets cancelled | Martin Willi | 2013-07-18 | 1 | -0/+13 |
| | |||||
* | watcher: release threads waiting in remove() when watcher thread gets cancelled | Martin Willi | 2013-07-18 | 1 | -0/+24 |
| | | | | | | | During daemon shutdown, users might call remove() after processor.set_threads(0) has been called. This gets problematic, as a watch event might be unable to signal completion when no threads are available anymore. Work around this issue by cancelling waiters once processor.cancel() has been called. | ||||
* | watcher: add a centralized an generic facility to monitor file descriptors | Martin Willi | 2013-07-18 | 2 | -0/+493 |
| | |||||
* | processor: Simplified the main loop | Tobias Brunner | 2013-06-28 | 1 | -109/+127 |
| | |||||
* | processor: Don't hold the lock while destroying jobs | Tobias Brunner | 2013-06-28 | 1 | -38/+66 |
| | | | | | | If a lock is held when queue_job() is called and the same lock is required during the destruction of a job, holding the internal lock in the processor while calling destroy() could result in a deadlock. | ||||
* | Moved debug.[ch] to utils folder | Tobias Brunner | 2012-10-24 | 2 | -2/+2 |
| | |||||
* | Moved data structures to new collections subfolder | Tobias Brunner | 2012-10-24 | 2 | -2/+2 |
| | |||||
* | Make rescheduling a job more predictable | Tobias Brunner | 2012-06-25 | 2 | -37/+85 |
| | | | | | | | | | | | | | This avoids race conditions between calls to cancel() and jobs that like to be rescheduled. If jobs were able to reschedule themselves it would theoretically be possible that two worker threads have the same job assigned (the one currently executing the job and the one executing the same but rescheduled job if it already is time to execute it), this means that cancel() could be called twice for that job. Creating a new job based on the current one and reschedule that is also OK, but rescheduling itself is more efficient for jobs that need to be executed often. | ||||
* | Centralized thread cancellation in processor_t | Tobias Brunner | 2012-06-25 | 6 | -206/+124 |
| | | | | | | | | | | This ensures that no threads are active when plugins and the rest of the daemon are unloaded. callback_job_t was simplified a lot in the process as its main functionality is now contained in processor_t. The parent-child relationships were abandoned as these were only needed to simplify job cancellation. | ||||
* | Give processor_t more control over the lifecycle of a job | Tobias Brunner | 2012-06-25 | 6 | -105/+176 |
| | | | | | | | | | | | Jobs are now destroyed by the processor, but they are allowed to reschedule themselves. That is, parts of the reschedule functionality already provided by callback_job_t is moved to the processor. Not yet fully supported is JOB_REQUEUE_DIRECT and canceling jobs. Note: job_t.destroy() is now called not only for queued jobs but also after execution or cancellation of jobs. job_t.status can be used to decide what to do in said method. | ||||
* | Use wrapped semaphore in callback_job_t. | Tobias Brunner | 2012-05-02 | 1 | -12/+9 |
| | |||||
* | Log worker thread ID with two digits. | Tobias Brunner | 2011-12-16 | 1 | -2/+2 |
| | |||||
* | Fixed compiler warnings regarding enum comparison. | Tobias Brunner | 2011-11-25 | 1 | -1/+1 |
| | | | | | | | | | Warnings like comparison of unsigned expression < 0 is always false are reported with -Wextra when enum types that are compiled to an unsigned type (which is up to the compiler) are checked for negativity. | ||||
* | Fixed common misspellings. | Tobias Brunner | 2011-07-20 | 2 | -2/+2 |
| | | | | Mostly found by 'codespell'. | ||||
* | Prevent deadlock while shutting down thread pool. | Tobias Brunner | 2011-06-08 | 1 | -2/+2 |
| | | | | | | | | | During destruction the main thread locks the mutex in processor_t and waits on a condvar for threads to have terminated. Because the mutex has also to be locked to decrement the thread count the condvar cannot be signaled before doing that as otherwise the main thread might already be waiting to join the threads while locking the mutex and thus causing a deadlock. | ||||
* | Update working thread count without allocation. | Tobias Brunner | 2011-05-16 | 1 | -22/+15 |
| | |||||
* | Make sure working thread count is correctly updated | Tobias Brunner | 2011-05-16 | 1 | -4/+23 |
| | |||||
* | Use CRITICAL job priority class for long running dispatcher jobs | Martin Willi | 2011-05-16 | 1 | -1/+2 |
| | |||||
* | Introduce a highest priority job for critical thread services | Martin Willi | 2011-05-16 | 2 | -2/+5 |
| | |||||
* | Added a callback_job constructor supporting custom priorities | Martin Willi | 2011-05-16 | 2 | -4/+36 |
| | |||||
* | Count number of threads active in each class, and reserve threads only if ↵ | Martin Willi | 2011-05-16 | 2 | -17/+66 |
| | | | | none active | ||||
* | Reserve threads for job priority classes based on strongswan.conf options | Martin Willi | 2011-05-16 | 1 | -1/+17 |
| | |||||
* | Added job priority enum names | Martin Willi | 2011-05-16 | 2 | -0/+27 |
| | |||||
* | Processor job scheduling respects job priority classes | Martin Willi | 2011-05-16 | 2 | -13/+47 |
| | |||||
* | Introduce priority classes for jobs | Martin Willi | 2011-05-16 | 2 | -2/+30 |
| | |||||
* | Migrated scheduler_t to INIT/METHOD macros | Martin Willi | 2011-05-05 | 1 | -33/+24 |
| | |||||
* | Migrated callback_job to INIT/METHOD macros | Martin Willi | 2011-05-05 | 2 | -38/+38 |
| | |||||
* | Migrated processor to INIT/METHOD macros | Martin Willi | 2011-05-05 | 1 | -42/+35 |
| | |||||
* | Do not invoke processor restart() if not required | Martin Willi | 2011-03-15 | 1 | -1/+2 |
| | | | | | Doing so might result in a deadlock during shutdown if a delayed restart is locked on the bus during the debug statement. | ||||
* | Remove obsolete pool_size argument in processor_create() | Martin Willi | 2010-11-16 | 1 | -1/+1 |
| | |||||
* | Refer to scheduler and processor via lib and not hydra. | Tobias Brunner | 2010-09-02 | 2 | -6/+4 |
| | |||||
* | Moved scheduler and thread pool to libstrongswan. | Tobias Brunner | 2010-09-02 | 7 | -0/+1298 |