123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- #if !defined _BITS_TYPES_H && !defined _PTHREAD_H
- # error "Never include <bits/pthreadtypes.h> directly; use <sys/types.h> instead."
- #endif
- #ifndef _BITS_PTHREADTYPES_H
- #define _BITS_PTHREADTYPES_H 1
- #define __need_schedparam
- #include <bits/sched.h>
- struct _pthread_fastlock
- {
- long int __status;
- int __spinlock;
- };
- #ifndef _PTHREAD_DESCR_DEFINED
- typedef struct _pthread_descr_struct *_pthread_descr;
- # define _PTHREAD_DESCR_DEFINED
- #endif
- typedef struct __pthread_attr_s
- {
- int __detachstate;
- int __schedpolicy;
- struct __sched_param __schedparam;
- int __inheritsched;
- int __scope;
- size_t __guardsize;
- int __stackaddr_set;
- void *__stackaddr;
- size_t __stacksize;
- } pthread_attr_t;
- typedef struct
- {
- struct _pthread_fastlock __c_lock;
- _pthread_descr __c_waiting;
- } pthread_cond_t;
- typedef struct
- {
- int __dummy;
- } pthread_condattr_t;
- typedef unsigned int pthread_key_t;
- typedef struct
- {
- int __m_reserved;
- int __m_count;
- _pthread_descr __m_owner;
- int __m_kind;
- struct _pthread_fastlock __m_lock;
- } pthread_mutex_t;
- typedef struct
- {
- int __mutexkind;
- } pthread_mutexattr_t;
- typedef int pthread_once_t;
- #if defined __USE_UNIX98 || defined __USE_XOPEN2K
- typedef struct _pthread_rwlock_t
- {
- struct _pthread_fastlock __rw_lock;
- int __rw_readers;
- _pthread_descr __rw_writer;
- _pthread_descr __rw_read_waiting;
- _pthread_descr __rw_write_waiting;
- int __rw_kind;
- int __rw_pshared;
- } pthread_rwlock_t;
- typedef struct
- {
- int __lockkind;
- int __pshared;
- } pthread_rwlockattr_t;
- #endif
- #ifdef __USE_XOPEN2K
- typedef volatile int pthread_spinlock_t;
- typedef struct {
- struct _pthread_fastlock __ba_lock;
- int __ba_required;
- int __ba_present;
- _pthread_descr __ba_waiting;
- } pthread_barrier_t;
- typedef struct {
- int __pshared;
- } pthread_barrierattr_t;
- #endif
- typedef unsigned long int pthread_t;
- #endif
|