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
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
c73d4f53f5
Processor job scheduling respects job priority classes
2011-05-16 15:24:13 +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
e18556e9e9
Moved scheduler and thread pool to libstrongswan.
2010-09-02 19:04:18 +02:00