From 7fdb900bc169f0105bf5fb2cd282f6448f3f11f7 Mon Sep 17 00:00:00 2001 From: rpj Date: Thu, 4 Nov 1999 17:18:43 +0000 Subject: 1999-11-05 Ross Johnson * general: Patched for portability to WinCE. The details are described in the file WinCE-PORT. Follow the instructions in README.WinCE to make the appropriate changes in config.h. - Tristan Savatier --- condvar.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'condvar.c') diff --git a/condvar.c b/condvar.c index 4b41a23..69ce69f 100644 --- a/condvar.c +++ b/condvar.c @@ -946,9 +946,21 @@ pthread_cond_broadcast (pthread_cond_t * cond) /* * Wake up all waiters */ + +#ifdef NEED_SEM + + result = (_pthread_increase_semaphore( &cv->sema, cv->waiters ) + ? 0 + : EINVAL); + +#else /* NEED_SEM */ + result = (ReleaseSemaphore( cv->sema, cv->waiters, NULL ) - ? 0 - : EINVAL ); + ? 0 + : EINVAL); + +#endif /* NEED_SEM */ + } (void) pthread_mutex_unlock(&(cv->waitersLock)); -- cgit v1.2.3