summaryrefslogtreecommitdiff
path: root/condvar.c
diff options
context:
space:
mode:
authorrpj <rpj>1999-11-04 17:18:43 +0000
committerrpj <rpj>1999-11-04 17:18:43 +0000
commit7fdb900bc169f0105bf5fb2cd282f6448f3f11f7 (patch)
tree3f3c80cb9efa420e259c407a28b77713985ca23b /condvar.c
parentefa438832bc1343c08c334e88aec4266040ddec3 (diff)
1999-11-05 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* 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 <tristan@mpegtv.com>
Diffstat (limited to 'condvar.c')
-rw-r--r--condvar.c16
1 files changed, 14 insertions, 2 deletions
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));