Tobias Brunner
b24287c269
Log worker thread ID with two digits.
2011-12-16 16:44:38 +01:00
Tobias Brunner
edad908792
Fixed compiler warnings regarding enum comparison.
...
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.
2011-11-25 09:40:30 +01:00
Tobias Brunner
f3bb1bd039
Fixed common misspellings.
...
Mostly found by 'codespell'.
2011-07-20 16:14:10 +02:00
Tobias Brunner
dcc1ad6a23
Prevent deadlock while shutting down thread pool.
...
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.
2011-06-08 11:44:42 +02:00
Tobias Brunner
92abe2bd68
Update working thread count without allocation.
2011-05-16 18:28:03 +02:00
Tobias Brunner
21692169b9
Make sure working thread count is correctly updated
2011-05-16 15:24:16 +02:00
Martin Willi
14bf2f689d
Use CRITICAL job priority class for long running dispatcher jobs
2011-05-16 15:24:15 +02:00
Martin Willi
1c8f58adb9
Introduce a highest priority job for critical thread services
2011-05-16 15:24:15 +02:00
Martin Willi
c6089e252d
Added a callback_job constructor supporting custom priorities
2011-05-16 15:24:15 +02:00
Martin Willi
877fdcf0b8
Count number of threads active in each class, and reserve threads only if none active
2011-05-16 15:24:14 +02:00
Martin Willi
68f56418cd
Reserve threads for job priority classes based on strongswan.conf options
2011-05-16 15:24:13 +02:00
Martin Willi
2959ea6f84
Added job priority enum names
2011-05-16 15:24:13 +02:00
Martin Willi
c73d4f53f5
Processor job scheduling respects job priority classes
2011-05-16 15:24:13 +02:00
Martin Willi
f77203bbfb
Introduce priority classes for jobs
2011-05-16 15:24:12 +02:00
Martin Willi
e7643c92d3
Migrated scheduler_t to INIT/METHOD macros
2011-05-05 11:14:51 +02:00
Martin Willi
cda46be72a
Migrated callback_job to INIT/METHOD macros
2011-05-05 11:14:51 +02:00
Martin Willi
3316742969
Migrated processor to INIT/METHOD macros
2011-05-05 11:14:50 +02:00
Martin Willi
11f89bc948
Do not invoke processor restart() if not required
...
Doing so might result in a deadlock during shutdown if a delayed
restart is locked on the bus during the debug statement.
2011-03-15 11:48:19 +01:00
Martin Willi
d93060759e
Remove obsolete pool_size argument in processor_create()
2010-11-16 09:39:06 +01:00
Tobias Brunner
bb381e26c6
Refer to scheduler and processor via lib and not hydra.
2010-09-02 19:04:18 +02:00
Tobias Brunner
e18556e9e9
Moved scheduler and thread pool to libstrongswan.
2010-09-02 19:04:18 +02:00