reorganize pthread data structures and move the definitions to alltypes.h
this allows sys/types.h to provide the pthread types, as required by POSIX. this design also facilitates forcing ABI-compatible sizes in the arch-specific alltypes.h, while eliminating the need for developers changing the internals of the pthread types to poke around with arch-specific headers they may not be able to test.
This commit is contained in:
parent
4fd159568a
commit
e882756311
28 changed files with 158 additions and 128 deletions
|
|
@ -78,7 +78,22 @@ TYPEDEF int id_t;
|
|||
TYPEDEF int uid_t;
|
||||
TYPEDEF int gid_t;
|
||||
TYPEDEF int key_t;
|
||||
|
||||
TYPEDEF struct __pthread * pthread_t;
|
||||
TYPEDEF int pthread_once_t;
|
||||
TYPEDEF int pthread_key_t;
|
||||
TYPEDEF int pthread_spinlock_t;
|
||||
|
||||
TYPEDEF struct { union { int __i[9]; size_t __s[2]; } __u; } pthread_attr_t;
|
||||
TYPEDEF unsigned pthread_mutexattr_t;
|
||||
TYPEDEF unsigned pthread_condattr_t;
|
||||
TYPEDEF unsigned pthread_barrierattr_t;
|
||||
TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
|
||||
TYPEDEF struct { union { int __i[6]; void *__p[1]; } __u; } pthread_mutex_t;
|
||||
TYPEDEF struct { union { int __i[12]; void *__p[1]; } __u; } pthread_cond_t;
|
||||
TYPEDEF struct { union { int __i[8]; void *__p[1]; } __u; } pthread_rwlock_t;
|
||||
TYPEDEF struct { union { int __i[5]; void *__p[1]; } __u; } pthread_barrier_t;
|
||||
|
||||
TYPEDEF long long off_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,22 @@ TYPEDEF int id_t;
|
|||
TYPEDEF unsigned int uid_t;
|
||||
TYPEDEF unsigned int gid_t;
|
||||
TYPEDEF int key_t;
|
||||
|
||||
TYPEDEF struct __pthread * pthread_t;
|
||||
TYPEDEF int pthread_once_t;
|
||||
TYPEDEF int pthread_key_t;
|
||||
TYPEDEF int pthread_spinlock_t;
|
||||
|
||||
TYPEDEF struct { union { int __i[14]; size_t __s[2]; } __u; } pthread_attr_t;
|
||||
TYPEDEF unsigned pthread_mutexattr_t;
|
||||
TYPEDEF unsigned pthread_condattr_t;
|
||||
TYPEDEF unsigned pthread_barrierattr_t;
|
||||
TYPEDEF struct { unsigned __attr[2]; } pthread_rwlockattr_t;
|
||||
|
||||
TYPEDEF struct { union { int __i[10]; void *__p[1]; } __u; } pthread_mutex_t;
|
||||
TYPEDEF struct { union { int __i[12]; void *__p[1]; } __u; } pthread_cond_t;
|
||||
TYPEDEF struct { union { int __i[14]; void *__p[1]; } __u; } pthread_rwlock_t;
|
||||
TYPEDEF struct { union { int __i[8]; void *__p[1]; } __u; } pthread_barrier_t;
|
||||
|
||||
TYPEDEF long off_t;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue