summaryrefslogtreecommitdiffstats
path: root/libc/include
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-03-10 16:44:08 -0800
committerDavid 'Digit' Turner <digit@google.com>2010-03-11 11:48:38 -0800
commitba9c6f0989ae94778ba2b9f597adc827c9dc81e8 (patch)
tree2376f2a87f6ac304bd93beca7c8139b890a6227f /libc/include
parent1cfbda826ce66e9bd1507a31b7e6df62e0dbcc6e (diff)
downloadbionic-ba9c6f0989ae94778ba2b9f597adc827c9dc81e8.zip
bionic-ba9c6f0989ae94778ba2b9f597adc827c9dc81e8.tar.gz
bionic-ba9c6f0989ae94778ba2b9f597adc827c9dc81e8.tar.bz2
bionic: pthread: use private futexes by default for mutexes and condvars
Private futexes are a recent kernel addition: faster futexes that cannot be shared between processes. This patch uses them by default, unless the PROCESS_SHARED attribute flag is used when creating a mutex and/or conditional variable. Also introduces pthread_condattr_init/destroy/setpshared/getpshared. Change-Id: I3a0e2116f467072b046524cb5babc00e41057a53
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/pthread.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/include/pthread.h b/libc/include/pthread.h
index 6603b3f..5c0a349 100644
--- a/libc/include/pthread.h
+++ b/libc/include/pthread.h
@@ -165,6 +165,11 @@ int pthread_mutex_unlock(pthread_mutex_t *mutex);
int pthread_mutex_trylock(pthread_mutex_t *mutex);
int pthread_mutex_timedlock(pthread_mutex_t *mutex, struct timespec* ts);
+int pthread_condattr_init(pthread_condattr_t *attr);
+int pthread_condattr_setpshared(pthread_condattr_t *attr, int pshared);
+int pthread_condattr_getpshared(pthread_condattr_t *attr, int *pshared);
+int pthread_condattr_destroy(pthread_condattr_t *attr);
+
int pthread_cond_init(pthread_cond_t *cond,
const pthread_condattr_t *attr);
int pthread_cond_destroy(pthread_cond_t *cond);