diff options
| author | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-23 15:10:02 -0400 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-09-23 15:10:02 -0400 |
| commit | d154954f02691618fdf73a5a97336e64cad37af0 (patch) | |
| tree | d2f1db7cc41fe703e011ea93f6c2f21d7cf20816 /libc/include/pthread.h | |
| parent | 4a05d12cf52a9a40759f11f28543bd75715c8f00 (diff) | |
| parent | 3f56b7f65adb9ee35cd0f878ca00b92011eec427 (diff) | |
| download | bionic-d154954f02691618fdf73a5a97336e64cad37af0.zip bionic-d154954f02691618fdf73a5a97336e64cad37af0.tar.gz bionic-d154954f02691618fdf73a5a97336e64cad37af0.tar.bz2 | |
Merge change 26419 into eclair
* changes:
Add pthread_mutex_lock_timeout_np
Diffstat (limited to 'libc/include/pthread.h')
| -rw-r--r-- | libc/include/pthread.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libc/include/pthread.h b/libc/include/pthread.h index ae7b758..6603b3f 100644 --- a/libc/include/pthread.h +++ b/libc/include/pthread.h @@ -207,6 +207,13 @@ 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); |
