summaryrefslogtreecommitdiffstats
path: root/sys/posix4
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-01-20 07:55:42 +0000
committerjasone <jasone@FreeBSD.org>2000-01-20 07:55:42 +0000
commit918817c6ddd20832eb24f834e6594408840cc46b (patch)
tree2fcb0984ce8ad4cd839b8977503a70c7a8eeb2af /sys/posix4
parent3daa9aa7192b6e32accee24548c7ea2a2c8847f8 (diff)
downloadFreeBSD-src-918817c6ddd20832eb24f834e6594408840cc46b.zip
FreeBSD-src-918817c6ddd20832eb24f834e6594408840cc46b.tar.gz
Track libc_r addition of semaphores implementation.
Approved by: jkh
Diffstat (limited to 'sys/posix4')
-rw-r--r--sys/posix4/semaphore.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/posix4/semaphore.h b/sys/posix4/semaphore.h
index e97abee..9741b06 100644
--- a/sys/posix4/semaphore.h
+++ b/sys/posix4/semaphore.h
@@ -38,27 +38,33 @@
*/
#include <sys/_posix.h>
+#include <machine/limits.h>
#ifdef _P1003_1B_INCLUDE_MAYBES
#include <sys/types.h>
#include <fcntl.h>
#endif
-typedef int sem_t;
+/* Opaque type definition. */
+struct sem;
+typedef struct sem *sem_t;
+
+#define SEM_FAILED ((sem_t *)0)
+#define SEM_VALUE_MAX UINT_MAX
#ifndef _KERNEL
#include <sys/cdefs.h>
__BEGIN_DECLS
-int sem_init __P((sem_t *, int, unsigned int));
-int sem_destroy __P((sem_t *));
-sem_t sem_open __P((const char *, int, ...));
-int sem_close __P((sem_t *));
-int sem_unlink __P((const char *));
-int sem_wait __P((sem_t *));
-int sem_trywait __P((sem_t *));
-int sem_post __P((sem_t *));
-int sem_getvalue __P((sem_t *, int *));
+int sem_init __P((sem_t *, int, unsigned int));
+int sem_destroy __P((sem_t *));
+sem_t *sem_open __P((const char *, int, ...));
+int sem_close __P((sem_t *));
+int sem_unlink __P((const char *));
+int sem_wait __P((sem_t *));
+int sem_trywait __P((sem_t *));
+int sem_post __P((sem_t *));
+int sem_getvalue __P((sem_t *, int *));
__END_DECLS
#endif
OpenPOWER on IntegriCloud