diff options
author | Tobias Brunner <tobias@strongswan.org> | 2008-11-25 19:30:02 +0000 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2008-11-25 19:30:02 +0000 |
commit | 6df2731e7847d65f3aceef2a24c6e8548839b5e8 (patch) | |
tree | 405d66d1e0be1621d7731776c02937c358aa76d7 /src/libstrongswan/utils/mutex.h | |
parent | ed6146ffbe3c798a49ff178d4448548240cbeb38 (diff) | |
download | strongswan-6df2731e7847d65f3aceef2a24c6e8548839b5e8.tar.bz2 strongswan-6df2731e7847d65f3aceef2a24c6e8548839b5e8.tar.xz |
replacing the pthread_mutex in scheduler_t with the wrapped implementation.
added a method to condvar_t which allows to wait for an absolute timeout.
Diffstat (limited to 'src/libstrongswan/utils/mutex.h')
-rw-r--r-- | src/libstrongswan/utils/mutex.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstrongswan/utils/mutex.h b/src/libstrongswan/utils/mutex.h index a0a198024..1aadb71ad 100644 --- a/src/libstrongswan/utils/mutex.h +++ b/src/libstrongswan/utils/mutex.h @@ -1,4 +1,5 @@ /* + * Copyright (C) 2008 Tobias Brunner * Copyright (C) 2008 Martin Willi * Hochschule fuer Technik Rapperswil * @@ -11,6 +12,8 @@ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. + * + * $Id$ */ /** @@ -99,6 +102,15 @@ struct condvar_t { bool (*timed_wait)(condvar_t *this, mutex_t *mutex, u_int timeout); /** + * Wait on a condvar until it gets signalized, or times out. + * + * @param mutex mutex to release while waiting + * @param time absolute time until timeout + * @return TRUE if timed out, FALSE otherwise + */ + bool (*timed_wait_abs)(condvar_t *this, mutex_t *mutex, timeval_t timeout); + + /** * Wake up a single thread in a condvar. */ void (*signal)(condvar_t *this); |