summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2011-02-17 17:16:20 -0500
committerRich Felker <dalias@aerifal.cx>2011-02-17 17:16:20 -0500
commite882756311c7b06e59fcc8e582f03852b7dcfd30 (patch)
treeaead1d2311ed1d3b68dd2b1f02ff6eed2c5ea2ea /arch
parent4fd159568aa1852fbbe6c11d35ccecaec3715d7c (diff)
downloadmusl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.gz
musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.bz2
musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.xz
musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.zip
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.
Diffstat (limited to 'arch')
-rwxr-xr-xarch/i386/bits/alltypes.h.sh15
-rwxr-xr-xarch/x86_64/bits/alltypes.h.sh15
2 files changed, 30 insertions, 0 deletions
diff --git a/arch/i386/bits/alltypes.h.sh b/arch/i386/bits/alltypes.h.sh
index a5ba060e..27289ea0 100755
--- a/arch/i386/bits/alltypes.h.sh
+++ b/arch/i386/bits/alltypes.h.sh
@@ -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;
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;