summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/include/semaphore.h
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2012-07-11 09:08:50 +0000
committerguenther <guenther@openbsd.org>2012-07-11 09:08:50 +0000
commit346dbd3f0c3d8485e44f8b9cc65e81153c301d63 (patch)
treeedc8a051db577469eec9c6c0176be1cb02e7c7db /lib/libpthread/include/semaphore.h
parentcheck that linking with X11 will work, we'll check later exactly what (diff)
downloadwireguard-openbsd-346dbd3f0c3d8485e44f8b9cc65e81153c301d63.tar.xz
wireguard-openbsd-346dbd3f0c3d8485e44f8b9cc65e81153c301d63.zip
sem_timedwait() needs the struct timespec tag to be pre-declared here.
Add restrict qualifiers.
Diffstat (limited to 'lib/libpthread/include/semaphore.h')
-rw-r--r--lib/libpthread/include/semaphore.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libpthread/include/semaphore.h b/lib/libpthread/include/semaphore.h
index 08d659b3854..f5256d936cb 100644
--- a/lib/libpthread/include/semaphore.h
+++ b/lib/libpthread/include/semaphore.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: semaphore.h,v 1.4 2012/03/03 10:02:26 guenther Exp $ */
+/* $OpenBSD: semaphore.h,v 1.5 2012/07/11 09:08:50 guenther Exp $ */
/* semaphore.h: POSIX 1003.1b semaphores */
@@ -44,6 +44,7 @@
/* Opaque type definition. */
struct sem;
typedef struct sem *sem_t;
+struct timespec;
#define SEM_FAILED ((sem_t *)0)
#define SEM_VALUE_MAX UINT_MAX
@@ -58,10 +59,10 @@ sem_t *sem_open(const char *, int, ...);
int sem_close(sem_t *);
int sem_unlink(const char *);
int sem_wait(sem_t *);
-int sem_timedwait(sem_t *, const struct timespec *);
+int sem_timedwait(sem_t * __restrict, const struct timespec * __restrict);
int sem_trywait(sem_t *);
int sem_post(sem_t *);
-int sem_getvalue(sem_t *, int *);
+int sem_getvalue(sem_t * __restrict, int * __restrict);
__END_DECLS
#endif /* _KERNEL */