From e882756311c7b06e59fcc8e582f03852b7dcfd30 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 17 Feb 2011 17:16:20 -0500 Subject: 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. --- arch/x86_64/bits/alltypes.h.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/x86_64') diff --git a/arch/x86_64/bits/alltypes.h.sh b/arch/x86_64/bits/alltypes.h.sh index dffb13a0..05c0b7dc 100755 --- a/arch/x86_64/bits/alltypes.h.sh +++ b/arch/x86_64/bits/alltypes.h.sh @@ -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; -- cgit v1.2.1