From a4e527db7984fb8f1ebee15eb2f70f23551e8ff3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 23 Sep 2007 17:21:41 +0000 Subject: [PATCH] * Fixed build for GCC 2.95.3 - it does not support newer C syntax. * Minor cleanup (there shall be 2 lines of space between functions). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22281 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/pthread/pthread_cond.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/posix/pthread/pthread_cond.c b/src/system/libroot/posix/pthread/pthread_cond.c index e684650eae..9f53cbadea 100644 --- a/src/system/libroot/posix/pthread/pthread_cond.c +++ b/src/system/libroot/posix/pthread/pthread_cond.c @@ -83,7 +83,8 @@ pthread_cond_destroy(pthread_cond_t *_cond) static status_t cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout) { - status_t status = B_OK; + status_t status; + int32 event; if (cond == NULL || *_mutex == NULL) return B_BAD_VALUE; @@ -101,7 +102,7 @@ cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout) cond->mutex = _mutex; cond->waiter_count++; - int32 event = atomic_get(&cond->event_counter); + event = atomic_get(&cond->event_counter); pthread_mutex_unlock(_mutex); @@ -120,6 +121,7 @@ cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout) return status; } + static status_t cond_signal(pthread_cond *cond, bool broadcast) { @@ -130,6 +132,7 @@ cond_signal(pthread_cond *cond, bool broadcast) return release_sem_etc(cond->sem, broadcast ? cond->waiter_count : 1, 0); } + int pthread_cond_wait(pthread_cond_t *_cond, pthread_mutex_t *_mutex) {