summaryrefslogtreecommitdiff
path: root/include/pthread.h
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2005-09-01 15:33:22 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2005-09-01 15:33:22 +0000
commit323abbb7ce5ad4cf38c9ad68229c14008b712cb2 (patch)
tree8eef670190e03959b279381d573a91ee7fec672f /include/pthread.h
parent7e4cbc3a50953cecc308df62bd21662be1be54d5 (diff)
downloadsrc-test2-323abbb7ce5ad4cf38c9ad68229c14008b712cb2.tar.gz
src-test2-323abbb7ce5ad4cf38c9ad68229c14008b712cb2.zip
Improve POSIX conformance:
- Don't pollute the namespace by including <sys/types.h>, <sys/time.h>, <sys/signal.h> and <limits.h>. Use __MINSIGSTKSZ and __ULONG_MAX from <machine/_limits.h>, __sigset_t from <sys/_sigset.h> instead. - Include <time.h> because POSIX says we have to. PTHREAD_{DESTRUCTOR_ITERATIONS,KEYS_MAX,STACK_MIN,THREADS_MAX} should eventually move to <limits.h> but are left here for now. Discussed on: standards@, threads@
Notes
Notes: svn path=/head/; revision=149692
Diffstat (limited to 'include/pthread.h')
-rw-r--r--include/pthread.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/pthread.h b/include/pthread.h
index f4abba1ead78..20aa19de705e 100644
--- a/include/pthread.h
+++ b/include/pthread.h
@@ -39,20 +39,20 @@
* Header files.
*/
#include <sys/cdefs.h>
-#include <sys/types.h>
#include <sys/_pthreadtypes.h>
-#include <sys/time.h>
-#include <sys/signal.h>
-#include <limits.h>
+#include <machine/_limits.h>
+#include <machine/_types.h>
+#include <sys/_sigset.h>
#include <sched.h>
+#include <time.h>
/*
* Run-time invariant values:
*/
#define PTHREAD_DESTRUCTOR_ITERATIONS 4
#define PTHREAD_KEYS_MAX 256
-#define PTHREAD_STACK_MIN MINSIGSTKSZ
-#define PTHREAD_THREADS_MAX ULONG_MAX
+#define PTHREAD_STACK_MIN __MINSIGSTKSZ
+#define PTHREAD_THREADS_MAX __ULONG_MAX
#define PTHREAD_BARRIER_SERIAL_THREAD -1
/*
@@ -220,7 +220,7 @@ int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *, int);
int pthread_rwlockattr_destroy(pthread_rwlockattr_t *);
pthread_t pthread_self(void);
int pthread_setspecific(pthread_key_t, const void *);
-int pthread_sigmask(int, const sigset_t *, sigset_t *);
+int pthread_sigmask(int, const __sigset_t *, __sigset_t *);
int pthread_spin_init(pthread_spinlock_t *, int);
int pthread_spin_destroy(pthread_spinlock_t *);