diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-19 00:57:10 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-03-19 00:57:10 +0100 |
commit | 13222caf06cce1225122a7ae92d6e782145718ab (patch) | |
tree | 28c1c5f7b8cb3155d0b3b1a3e6926c4e6913d575 /sysdeps/pthread | |
parent | 1efaba2cd9eb0c5af4617c5be01a6b5e96d7d8a0 (diff) |
Move pthread/pthreadtypes.h to bits/pthreadtypes.h
* Makefile (headers): Remove pthread/pthreadtypes.h.
* sysdeps/generic/pthread/pthread.h: Include <bits/pthreadtypes.h>
instead of <pthread/pthreadtypes.h>.
* sysdeps/generic/timer_routines.h: Likewise.
* sysdeps/pthread/pthread/pthreadtypes.h: Move file content to...
* sysdeps/pthread/bits/pthreadtypes.h: ... this file. Do not include
<pthread/pthreadtypes.h>
Diffstat (limited to 'sysdeps/pthread')
-rw-r--r-- | sysdeps/pthread/bits/pthreadtypes.h | 106 |
1 files changed, 105 insertions, 1 deletions
diff --git a/sysdeps/pthread/bits/pthreadtypes.h b/sysdeps/pthread/bits/pthreadtypes.h index d87d064..8853e1e 100644 --- a/sysdeps/pthread/bits/pthreadtypes.h +++ b/sysdeps/pthread/bits/pthreadtypes.h @@ -23,7 +23,111 @@ #ifndef _BITS_PTHREADTYPES_H #define _BITS_PTHREADTYPES_H 1 -#include <pthread/pthreadtypes.h> #include <bits/thread-shared-types.h> +#include <features.h> + +#include <bits/types.h> + +__BEGIN_DECLS + +#include <bits/pthread.h> +typedef __pthread_t pthread_t; + +/* Possible values for the process shared attribute. */ +enum __pthread_process_shared + { + __PTHREAD_PROCESS_PRIVATE = 0, + __PTHREAD_PROCESS_SHARED + }; + +/* Possible values for the inheritsched attribute. */ +enum __pthread_inheritsched + { + __PTHREAD_EXPLICIT_SCHED = 0, + __PTHREAD_INHERIT_SCHED + }; + +/* Possible values for the `contentionscope' attribute. */ +enum __pthread_contentionscope + { + __PTHREAD_SCOPE_SYSTEM = 0, + __PTHREAD_SCOPE_PROCESS + }; + +/* Possible values for the `detachstate' attribute. */ +enum __pthread_detachstate + { + __PTHREAD_CREATE_JOINABLE = 0, + __PTHREAD_CREATE_DETACHED + }; + +#include <bits/thread-attr.h> +typedef struct __pthread_attr pthread_attr_t; + +enum __pthread_mutex_protocol + { + __PTHREAD_PRIO_NONE= 0, + __PTHREAD_PRIO_INHERIT, + __PTHREAD_PRIO_PROTECT + }; + +enum __pthread_mutex_type + { + __PTHREAD_MUTEX_TIMED, + __PTHREAD_MUTEX_ERRORCHECK, + __PTHREAD_MUTEX_RECURSIVE + }; + +enum __pthread_mutex_robustness + { + __PTHREAD_MUTEX_STALLED, + __PTHREAD_MUTEX_ROBUST = 0x100 + }; + +#include <bits/mutex-attr.h> +typedef struct __pthread_mutexattr pthread_mutexattr_t; + +#include <bits/mutex.h> +typedef struct __pthread_mutex pthread_mutex_t; + +#include <bits/condition-attr.h> +typedef struct __pthread_condattr pthread_condattr_t; + +#include <bits/condition.h> +typedef struct __pthread_cond pthread_cond_t; + +#ifdef __USE_XOPEN2K +# include <bits/spin-lock.h> +typedef __pthread_spinlock_t pthread_spinlock_t; +#endif /* XPG6. */ + +#if defined __USE_UNIX98 || defined __USE_XOPEN2K + +#include <bits/rwlock-attr.h> +typedef struct __pthread_rwlockattr pthread_rwlockattr_t; + +#include <bits/rwlock.h> +typedef struct __pthread_rwlock pthread_rwlock_t; + +#endif /* __USE_UNIX98 || __USE_XOPEN2K */ + +#ifdef __USE_XOPEN2K + +#include <bits/barrier-attr.h> +typedef struct __pthread_barrierattr pthread_barrierattr_t; + +#include <bits/barrier.h> +typedef struct __pthread_barrier pthread_barrier_t; + +#endif /* __USE_XOPEN2K */ + +#include <bits/thread-specific.h> +typedef __pthread_key pthread_key_t; + +#include <bits/once.h> +typedef struct __pthread_once pthread_once_t; + +__END_DECLS + #endif /* bits/pthreadtypes.h */ |