diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-02-17 17:16:20 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-02-17 17:16:20 -0500 |
commit | e882756311c7b06e59fcc8e582f03852b7dcfd30 (patch) | |
tree | aead1d2311ed1d3b68dd2b1f02ff6eed2c5ea2ea /src/internal | |
parent | 4fd159568aa1852fbbe6c11d35ccecaec3715d7c (diff) | |
download | musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.zip musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.gz musl-e882756311c7b06e59fcc8e582f03852b7dcfd30.tar.bz2 |
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 'src/internal')
-rw-r--r-- | src/internal/pthread_impl.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index e481ab5..615af70 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -38,6 +38,25 @@ struct pthread { pthread_attr_t attr; }; +#define __SU (sizeof(size_t)/sizeof(int)) + +#define _a_stacksize __u.__s[0] +#define _a_guardsize __u.__s[1] +#define _a_detach __u.__i[2*__SU+0] +#define _m_type __u.__i[0] +#define _m_lock __u.__i[1] +#define _m_waiters __u.__i[2] +#define _m_owner __u.__i[3] +#define _c_block __u.__i[0] +#define _rw_wrlock __u.__i[0] +#define _rw_readers __u.__i[1] +#define _rw_waiters __u.__i[2] +#define _rw_owner __u.__i[3] +#define _b_count __u.__i[0] +#define _b_limit __u.__i[1] +#define _b_left __u.__i[2] +#define _b_waiters __u.__i[3] + #include "pthread_arch.h" #define SIGCANCEL 32 |