diff options
| author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:05:31 -0800 |
|---|---|---|
| committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-15 12:05:31 -0800 |
| commit | 95604529ec25fe7923ba88312c590f38aa5e3d9e (patch) | |
| tree | c6f1dd860fcdc273ab21b696778987261f6e4fa8 /libc/include/pthread.h | |
| parent | 71c0aeb44f2301af85d6a370dbd7308602a1dfe0 (diff) | |
| parent | 194d3fa048cf909ca592dd56fa538dc9cd3f5ddb (diff) | |
| download | bionic-95604529ec25fe7923ba88312c590f38aa5e3d9e.zip bionic-95604529ec25fe7923ba88312c590f38aa5e3d9e.tar.gz bionic-95604529ec25fe7923ba88312c590f38aa5e3d9e.tar.bz2 | |
merge from eclair
Diffstat (limited to 'libc/include/pthread.h')
| -rw-r--r-- | libc/include/pthread.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/libc/include/pthread.h b/libc/include/pthread.h index e3afdae..6603b3f 100644 --- a/libc/include/pthread.h +++ b/libc/include/pthread.h @@ -179,14 +179,41 @@ int pthread_cond_timedwait(pthread_cond_t *cond, * to the CLOCK_MONOTONIC clock instead, to avoid any problems when * the wall-clock time is changed brutally */ +int pthread_cond_timedwait_monotonic_np(pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec *abstime); + +/* BIONIC: DEPRECATED. same as pthread_cond_timedwait_monotonic_np() + * unfortunately pthread_cond_timedwait_monotonic has shipped already + */ int pthread_cond_timedwait_monotonic(pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); +#define HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1 + +/* BIONIC: same as pthread_cond_timedwait, except the 'reltime' given refers + * is relative to the current time. + */ +int pthread_cond_timedwait_relative_np(pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec *reltime); + +#define HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE 1 + + + int pthread_cond_timeout_np(pthread_cond_t *cond, pthread_mutex_t * mutex, unsigned msecs); +/* same as pthread_mutex_lock(), but will wait up to 'msecs' milli-seconds + * before returning. same return values than pthread_mutex_trylock though, i.e. + * returns EBUSY if the lock could not be acquired after the timeout + * expired. + */ +int pthread_mutex_lock_timeout_np(pthread_mutex_t *mutex, unsigned msecs); + int pthread_key_create(pthread_key_t *key, void (*destructor_function)(void *)); int pthread_key_delete (pthread_key_t); int pthread_setspecific(pthread_key_t key, const void *value); |
