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
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue