diff options
author | stefanf <stefanf@FreeBSD.org> | 2005-09-01 15:33:22 +0000 |
---|---|---|
committer | stefanf <stefanf@FreeBSD.org> | 2005-09-01 15:33:22 +0000 |
commit | 2119fbd2ff51b2112ebbb67559a4882510684d3f (patch) | |
tree | 8eef670190e03959b279381d573a91ee7fec672f /include/pthread.h | |
parent | be47cc4f82745bb02051fd1b4cf464d698710177 (diff) | |
download | FreeBSD-src-2119fbd2ff51b2112ebbb67559a4882510684d3f.zip FreeBSD-src-2119fbd2ff51b2112ebbb67559a4882510684d3f.tar.gz |
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@
Diffstat (limited to 'include/pthread.h')
-rw-r--r-- | include/pthread.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/pthread.h b/include/pthread.h index f4abba1..20aa19d 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 *); |