Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | thread: Note that tread_cancellation_point temporarily activates cancelability | Martin Willi | 2013-11-06 | 1 | -5/+4 |
| | |||||
* | Fixed some typos | Tobias Brunner | 2013-10-29 | 1 | -1/+1 |
| | |||||
* | rwlock: Disable thread cancelability while waiting in (fallback) rwlock | Martin Willi | 2013-10-24 | 1 | -0/+7 |
| | | | | | | 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. | ||||
* | rwlock: Don't use buggy pthread_rwlock on OS X | Martin Willi | 2013-10-24 | 1 | -0/+7 |
| | | | | Recursive read locks don't seem to work properly, at least on 10.9. | ||||
* | semaphore: Support cancellation in wait functions of semaphore fallback | Martin Willi | 2013-10-23 | 1 | -4/+6 |
| | | | | | Semaphore wait functions should be a thread cancellation point, but did not properly release the mutex in the fallback implementation. | ||||
* | rwlock: Re-acquire rwlock even if condvar wait times out | Martin Willi | 2013-10-23 | 1 | -1/+1 |
| | | | | | A caller expects that the associated rwlock is held, whether the condvar gets signaled or the wait times out. | ||||
* | thread: implicitly create thread_t if an external thread calls thread_current() | Martin Willi | 2013-07-18 | 1 | -1/+14 |
| | |||||
* | semaphore: similar to thread_create(), semaphore_create() is used by Mach | Martin Willi | 2013-05-06 | 1 | -0/+5 |
| | | | | | | The compiler spits no warning, but the wrong symbol is used when calling semaphore_create() from strongSwan. Override the name with a #define to force the use of our semaphore_create(). | ||||
* | Use SIGUSR2 for SIG_CANCEL on Android | Tobias Brunner | 2013-02-26 | 1 | -0/+4 |
| | | | | | | | | | | SIGRTMIN is defined as 32 while sigset_t is defined as unsigned long (i.e. holds 32 signals). Hence, the signal could never be blocked. Sending the signal still canceled threads, but sometimes in situations where they shouldn't have been canceled (e.g. while holding a lock). Fixes #298. | ||||
* | Use a ./configure check to detect pthread spinlock availability | Martin Willi | 2012-12-18 | 1 | -15/+7 |
| | | | | | _POSIX_SPIN_LOCKS does not seem to be defined correctly on all systems (Debian libc 2.3.6). Fixes #262. | ||||
* | Moved debug.[ch] to utils folder | Tobias Brunner | 2012-10-24 | 4 | -4/+4 |
| | |||||
* | Moved data structures to new collections subfolder | Tobias Brunner | 2012-10-24 | 1 | -1/+1 |
| | |||||
* | Use a helper function to add milliseconds to timeval structs | Tobias Brunner | 2012-10-18 | 2 | -13/+2 |
| | |||||
* | Properly handle thread cancelation in rwlock_condvar_t | Tobias Brunner | 2012-09-21 | 1 | -15/+20 |
| | |||||
* | Added a condvar implementation that works with rwlock_t | Tobias Brunner | 2012-09-21 | 2 | -0/+216 |
| | |||||
* | Don't use POSIX semaphores if a MONOTONIC clock is available | Martin Willi | 2012-08-20 | 1 | -0/+8 |
| | | | | | | POSIX semaphores use CLOCK_REALTIME, but our semaphore_t abstraction expects CLOCK_MONOTONIC based times. Use the mutex/condvar based fallback if time_monotonic() actuall returns monotonic times. | ||||
* | Add a mutex/condvar based semaphore implementation if sem_timedwait is ↵ | Martin Willi | 2012-08-20 | 1 | -2/+67 |
| | | | | | | unavailable Fixes #214. | ||||
* | Merge branch 'android-app' | Tobias Brunner | 2012-08-13 | 1 | -2/+2 |
|\ | | | | | | | | | | | | | | | This branch introduces a userland IPsec implementation (libipsec) and an Android App which targets the VpnService API that is provided by Android 4+. The implementation is based on the bachelor thesis 'Userland IPsec for Android 4' by Giuliano Grassi and Ralf Sager. | ||||
| * | Ensure thread IDs always start with 1 even if the library is reused | Tobias Brunner | 2012-08-13 | 1 | -2/+2 |
| | | | | | | | | | | | | Within the Android App the library stays loaded in memory and is just initialized/deinitialized with each connection, the static thread counter would continuously increase without this patch. | ||||
* | | If _POSIX_SPIN_LOCKS is defined as -1, it is not available | Martin Willi | 2012-08-10 | 1 | -0/+4 |
|/ | |||||
* | Implemented recursive mutex without thread-specific counter | Tobias Brunner | 2012-08-03 | 1 | -23/+17 |
| | |||||
* | Use a single thread-specific value for our custom rwlock_t implementation | Tobias Brunner | 2012-08-03 | 1 | -50/+67 |
| | | | | | | 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. | ||||
* | Properly cleanup thread-local values for the threads destroying ↵ | Tobias Brunner | 2012-07-12 | 1 | -2/+19 |
| | | | | thread_value_t objects | ||||
* | Added wrapper for POSIX spin locks | Tobias Brunner | 2012-07-04 | 2 | -0/+190 |
| | |||||
* | Added recursive read_lock support to our own implementation of rwlock_t. | Tobias Brunner | 2012-05-02 | 1 | -4/+35 |
| | |||||
* | Added a wrapper class around POSIX semaphores. | Tobias Brunner | 2012-05-02 | 2 | -0/+191 |
| | |||||
* | Fix gettid() on Android, which is defined in unistd.h there. | Tobias Brunner | 2012-01-12 | 1 | -3/+4 |
| | |||||
* | Use native gettid() if available (which is the case on Android). | Tobias Brunner | 2012-01-10 | 1 | -3/+11 |
| | |||||
* | Log native thread ID when a thread is created. | Tobias Brunner | 2011-12-16 | 1 | -1/+16 |
| | | | | | If possible gettid() is used, otherwise pthread_self() is logged (which is not completely portable, but seems to work on most supported platforms). | ||||
* | Create a dummy pthread key for value "0", as some buggy PKCS#11 libraries ↵ | Martin Willi | 2011-12-07 | 1 | -0/+10 |
| | | | | mangle it | ||||
* | Migrated thread_t to INIT/METHOD macros. | Tobias Brunner | 2011-10-03 | 1 | -34/+26 |
| | |||||
* | Migrated mutex_t to INIT/METHOD macros. | Tobias Brunner | 2011-10-03 | 1 | -72/+56 |
| | |||||
* | Migrated rwlock_t to INIT/METHOD macros. | Tobias Brunner | 2011-10-03 | 1 | -61/+45 |
| | |||||
* | Migrated thread_value_t to INIT/METHOD macros. | Tobias Brunner | 2011-10-03 | 1 | -17/+15 |
| | |||||
* | id of non-registered threads defaults to 0 | Andreas Steffen | 2011-05-06 | 1 | -1/+18 |
| | |||||
* | Option to skip slow addr2line resolution in leak-detective | Martin Willi | 2010-05-20 | 1 | -1/+1 |
| | |||||
* | We have to rename thread_create on Mac OS X because it conflicts with a syscall. | Tobias Brunner | 2010-04-29 | 1 | -0/+6 |
| | |||||
* | The mutex of a thread has to be locked when destroying it. | Tobias Brunner | 2010-04-29 | 1 | -0/+2 |
| | |||||
* | Adding DBG_LIB to all calls of libstrongswan's version of DBG*. | Tobias Brunner | 2010-04-06 | 3 | -11/+11 |
| | |||||
* | corrected captions | Andreas Steffen | 2010-02-01 | 1 | -2/+2 |
| | |||||
* | Added a workaround for the missing pthread_cancel on Android. | Tobias Brunner | 2009-12-23 | 1 | -0/+35 |
| | |||||
* | Use pthread_cond_timedwait_monotonic on Android. | Tobias Brunner | 2009-12-23 | 1 | -0/+5 |
| | |||||
* | Readding changes that got lost during refactoring/rebasing. | Tobias Brunner | 2009-12-23 | 1 | -4/+17 |
| | |||||
* | Using the thread wrapper in charon, libstrongswan and their plugins. | Tobias Brunner | 2009-12-23 | 2 | -29/+1 |
| | |||||
* | Adding an object-oriented wrapper for thread-specific values. | Tobias Brunner | 2009-12-23 | 2 | -0/+146 |
| | |||||
* | Adding an object-oriented wrapper for threads. | Tobias Brunner | 2009-12-23 | 2 | -0/+592 |
| | |||||
* | Check for pthread_condattr_init added to configure script. | Tobias Brunner | 2009-12-23 | 1 | -5/+9 |
| | |||||
* | Moved implementation of condvar_t to mutex.c because it requires access to ↵ | Tobias Brunner | 2009-12-23 | 2 | -177/+156 |
| | | | | private_mutex_t. | ||||
* | Separated the public interfaces of the threading primitives. | Tobias Brunner | 2009-12-23 | 6 | -87/+293 |
| | |||||
* | Implemented a read-write lock using only mutex_t and condvar_t (in case the ↵ | Tobias Brunner | 2009-12-23 | 2 | -0/+186 |
| | | | | pthread_rwlock_* group of functions is not available). |