summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2013-03-24 19:55:46 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2013-03-24 19:55:46 +0000
commiteb4be0f299bbada159ad1424fb92b1ce34fe6538 (patch)
treeec0b10812a28cede9ba9e12a5bcb5d9c3a19ea39 /lib
parenteeffdc7bc57855946ab410d85b5919736b8800a5 (diff)
SEM_VALUE_MAX belongs in <limits.h> (via sys/syslimits.h)
struct sem --> struct __sem (doesn't belong in public namespace) Zap pointless _KERNEL tests ok deraadt@
Diffstat (limited to 'lib')
-rw-r--r--lib/libpthread/include/semaphore.h13
-rw-r--r--lib/librthread/rthread.h6
2 files changed, 6 insertions, 13 deletions
diff --git a/lib/libpthread/include/semaphore.h b/lib/libpthread/include/semaphore.h
index b706635b94c..a93b8d4403f 100644
--- a/lib/libpthread/include/semaphore.h
+++ b/lib/libpthread/include/semaphore.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: semaphore.h,v 1.7 2013/03/24 17:47:49 deraadt Exp $ */
+/* $OpenBSD: semaphore.h,v 1.8 2013/03/24 19:55:45 guenther Exp $ */
/* semaphore.h: POSIX 1003.1b semaphores */
@@ -39,17 +39,12 @@
#ifndef _SEMAPHORE_H_
#define _SEMAPHORE_H_
-#include <sys/limits.h>
-
/* Opaque type definition. */
-struct sem;
-typedef struct sem *sem_t;
+struct __sem;
+typedef struct __sem *sem_t;
struct timespec;
#define SEM_FAILED ((sem_t *)0)
-#define SEM_VALUE_MAX UINT_MAX
-
-#ifndef _KERNEL
__BEGIN_DECLS
int sem_init(sem_t *, int, unsigned int);
@@ -64,6 +59,4 @@ int sem_post(sem_t *);
int sem_getvalue(sem_t * __restrict, int * __restrict);
__END_DECLS
-#endif /* _KERNEL */
-
#endif /* _SEMAPHORE_H_ */
diff --git a/lib/librthread/rthread.h b/lib/librthread/rthread.h
index 76271cea022..186a3459041 100644
--- a/lib/librthread/rthread.h
+++ b/lib/librthread/rthread.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.h,v 1.40 2012/08/22 23:43:32 matthew Exp $ */
+/* $OpenBSD: rthread.h,v 1.41 2013/03/24 19:55:45 guenther Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -45,7 +45,7 @@ struct stack {
size_t len; /* total size of allocated stack */
};
-struct sem {
+struct __sem {
_spinlock_lock_t lock;
volatile int waitcount;
volatile int value;
@@ -140,7 +140,7 @@ struct pthread_spinlock {
};
struct pthread {
- struct sem donesem;
+ struct __sem donesem;
#if TLS_VARIANT == 1
int *errno_ptr;
#endif