aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/semaphore.h
diff options
context:
space:
mode:
authorJason Evans <jasone@FreeBSD.org>2000-01-20 07:55:42 +0000
committerJason Evans <jasone@FreeBSD.org>2000-01-20 07:55:42 +0000
commit4f249023a475d2051cca979a1d775da5fc72a32d (patch)
tree6f3757f3bd51a8e0d4e48de4129f0f1ada7aeabf /sys/sys/semaphore.h
parent120bfc9ded5e1b2c07a55564b032f4255fab5804 (diff)
downloadsrc-4f249023a475d2051cca979a1d775da5fc72a32d.tar.gz
src-4f249023a475d2051cca979a1d775da5fc72a32d.zip
Track libc_r addition of semaphores implementation.
Approved by: jkh
Notes
Notes: svn path=/head/; revision=56321
Diffstat (limited to 'sys/sys/semaphore.h')
-rw-r--r--sys/sys/semaphore.h26
1 files changed, 16 insertions, 10 deletions
diff --git a/sys/sys/semaphore.h b/sys/sys/semaphore.h
index e97abee4f67a..9741b068add4 100644
--- a/sys/sys/semaphore.h
+++ b/sys/sys/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