* 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
This commit is contained in:
parent
8961bec039
commit
a4e527db79
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user