From c156eacc8b9c6f33f89c7563f2821320be79c2e1 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 1 Jul 2001 14:35:49 +0000 Subject: 2001-07-01 Ross Johnson Contributed by - Alexander Terekhov. * condvar.c: Fixed lost signal bug reported by Timur Aydin (taydin@snet.net). [RPJ (me) didn't translate the original algorithm correctly.] * semaphore.c: Added sem_post_multiple; this is a useful routine, but it doesn't appear to be standard. For now it's not an exported function. --- semaphore.h | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'semaphore.h') diff --git a/semaphore.h b/semaphore.h index 71679dd..8bb9b64 100644 --- a/semaphore.h +++ b/semaphore.h @@ -69,36 +69,30 @@ typedef struct sem_t_ * sem_t; int sem_init (sem_t * sem, int pshared, - unsigned int value - ); + unsigned int value); -int sem_destroy (sem_t * sem - ); +int sem_destroy (sem_t * sem); -int sem_trywait (sem_t * sem - ); +int sem_trywait (sem_t * sem); -int sem_wait (sem_t * sem - ); +int sem_wait (sem_t * sem); -int sem_post (sem_t * sem - ); +int sem_post (sem_t * sem); + +int sem_post_multiple (sem_t * sem, + int count); int sem_open (const char * name, int oflag, mode_t mode, - unsigned int value - ); + unsigned int value); -int sem_close (sem_t * sem - ); +int sem_close (sem_t * sem); -int sem_unlink (const char * name - ); +int sem_unlink (const char * name); int sem_getvalue (sem_t * sem, - int * sval - ); + int * sval); #ifdef __cplusplus } /* End of extern "C" */ -- cgit v1.2.3