Tobias Brunner
1dd58b0e21
Fixed some typos
2013-10-29 11:44:23 +01:00
Martin Willi
1a20a22d09
rwlock: Disable thread cancelability while waiting in (fallback) rwlock
...
An rwlock wait is not a thread cancellation point. As a canceled thread
would not have released the mutex, the rwlock would have been left in unusable
state.
2013-10-24 14:53:53 +02:00
Martin Willi
181d071363
rwlock: Don't use buggy pthread_rwlock on OS X
...
Recursive read locks don't seem to work properly, at least on 10.9.
2013-10-24 14:53:47 +02:00
Martin Willi
47c76c1b05
rwlock: Re-acquire rwlock even if condvar wait times out
...
A caller expects that the associated rwlock is held, whether the condvar
gets signaled or the wait times out.
2013-10-23 11:52:26 +02:00
Tobias Brunner
f05b427265
Moved debug.[ch] to utils folder
2012-10-24 16:00:51 +02:00
Tobias Brunner
eecd41e349
Use a helper function to add milliseconds to timeval structs
2012-10-18 12:25:59 +02:00
Tobias Brunner
e811cf152a
Properly handle thread cancelation in rwlock_condvar_t
2012-09-21 18:16:27 +02:00
Tobias Brunner
60dc44648f
Added a condvar implementation that works with rwlock_t
2012-09-21 18:16:27 +02:00
Tobias Brunner
920f29e7d5
Use a single thread-specific value for our custom rwlock_t implementation
...
The pthread implementation on Android currently only supports 64
different thread-specific values per process, which we hit easily when
every rwlock_t requires one.
2012-08-03 11:30:18 +02:00
Tobias Brunner
4d21000cf7
Added recursive read_lock support to our own implementation of rwlock_t.
2012-05-02 14:45:38 +02:00
Tobias Brunner
7fa43a9036
Migrated rwlock_t to INIT/METHOD macros.
2011-10-03 15:31:04 +02:00
Tobias Brunner
8b0e09103b
Adding DBG_LIB to all calls of libstrongswan's version of DBG*.
2010-04-06 12:47:40 +02:00
Tobias Brunner
eba64cef41
Separated the public interfaces of the threading primitives.
2009-12-23 17:01:53 +01:00
Tobias Brunner
f36143b0ba
Implemented a read-write lock using only mutex_t and condvar_t (in case the pthread_rwlock_* group of functions is not available).
2009-12-23 17:01:30 +01:00
Tobias Brunner
b1f35d0695
Threading primitives separated.
2009-12-23 17:01:30 +01:00