* 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:
@@ -83,7 +83,8 @@ pthread_cond_destroy(pthread_cond_t *_cond)
|
|||||||
static status_t
|
static status_t
|
||||||
cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout)
|
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)
|
if (cond == NULL || *_mutex == NULL)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
@@ -101,7 +102,7 @@ cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout)
|
|||||||
cond->mutex = _mutex;
|
cond->mutex = _mutex;
|
||||||
cond->waiter_count++;
|
cond->waiter_count++;
|
||||||
|
|
||||||
int32 event = atomic_get(&cond->event_counter);
|
event = atomic_get(&cond->event_counter);
|
||||||
|
|
||||||
pthread_mutex_unlock(_mutex);
|
pthread_mutex_unlock(_mutex);
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ cond_wait(pthread_cond *cond, pthread_mutex_t *_mutex, bigtime_t timeout)
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static status_t
|
static status_t
|
||||||
cond_signal(pthread_cond *cond, bool broadcast)
|
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);
|
return release_sem_etc(cond->sem, broadcast ? cond->waiter_count : 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
pthread_cond_wait(pthread_cond_t *_cond, pthread_mutex_t *_mutex)
|
pthread_cond_wait(pthread_cond_t *_cond, pthread_mutex_t *_mutex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user