summaryrefslogtreecommitdiff
path: root/semaphore.h
diff options
context:
space:
mode:
authorrpj <rpj>1999-05-29 06:44:29 +0000
committerrpj <rpj>1999-05-29 06:44:29 +0000
commit0103da82bdf86764129c3b1e57c0496af1bb91ab (patch)
tree6bc26b5ecd6623422ec4ba46c6259f94cf699cf5 /semaphore.h
parent17b9298d9918a36c344741f20f165bc67b5b7769 (diff)
./ChangeLog
Sat May 8 09:42:30 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * pthread.def (sem_open): Add. (sem_close): Add. (sem_unlink): Add. (sem_getvalue): Add. * FAQ (Question 3): Add. Thu Apr 8 01:16:23 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * semaphore.c (sem_open): New function; returns an error (ENOSYS). (sem_close): ditto. (sem_unlink): ditto. (sem_getvalue): ditto. * semaphore.h (_POSIX_SEMAPHORES): define. ./tests/ChangeLog Sat May 29 23:29:04 1999 Ross Johnson <rpj@ixobrychus.canberra.edu.au> * runall.bat (condvar5): Add new test. * runall.bat (condvar6): Add new test. * Makefile (condvar5) : Add new test. * Makefile (condvar6) : Add new test. * condvar5.c: New test for pthread_cond_broadcast(). * condvar6.c: New test for pthread_cond_broadcast().
Diffstat (limited to 'semaphore.h')
-rw-r--r--semaphore.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/semaphore.h b/semaphore.h
index f5d9c83..e05cc4a 100644
--- a/semaphore.h
+++ b/semaphore.h
@@ -31,11 +31,15 @@
#include <process.h>
#include <errno.h>
+#define _POSIX_SEMAPHORES
+
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
+typedef unsigned int mode_t;
+
typedef HANDLE sem_t;
int sem_init (sem_t * sem,
@@ -55,6 +59,21 @@ int sem_wait (sem_t * sem
int sem_post (sem_t * sem
);
+int sem_open (const char * name,
+ int oflag,
+ ...
+ );
+
+int sem_close (sem_t * sem
+ );
+
+int sem_unlink (const char * name
+ );
+
+int sem_getvalue (sem_t * sem,
+ int * sval
+ );
+
#ifdef __cplusplus
} /* End of extern "C" */
#endif /* __cplusplus */