diff options
author | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-19 11:57:19 +0200 |
---|---|---|
committer | Jari Vetoniemi <mailroxas@gmail.com> | 2018-02-19 12:00:41 +0200 |
commit | b1560445f2f700fbd6c243a4aea38ce38e49a426 (patch) | |
tree | f4d68c9eb240745870685e0caff0d07af8cf5371 | |
parent | a7a253f9d4cc82794c5a5360f3a017fd9b63de9b (diff) |
pthread: implement bionic_pthread_cond_wait
-rw-r--r-- | src/libpthread.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libpthread.c b/src/libpthread.c index db11fc5..b09a0ba 100644 --- a/src/libpthread.c +++ b/src/libpthread.c @@ -197,3 +197,12 @@ bionic_pthread_cond_signal(bionic_cond_t *cond) INIT_IF_NOT_MAPPED(cond, default_pthread_cond_init); return pthread_cond_signal(cond->glibc); } + +int +bionic_pthread_cond_wait(bionic_cond_t *cond, bionic_mutex_t *mutex) +{ + assert(cond && mutex); + INIT_IF_NOT_MAPPED(cond, default_pthread_cond_init); + INIT_IF_NOT_MAPPED(mutex, default_pthread_mutex_init); + return pthread_cond_wait(cond->glibc, mutex->glibc); +} |