1 #ifndef _PTHREAD_IMPL_H
2 #define _PTHREAD_IMPL_H
20 #define pthread __pthread
24 unsigned long tlsdesc[4];
26 int tsd_used, errno_val, *errno_ptr;
27 volatile int canceldisable, cancelasync, cancelpoint, cancel;
28 unsigned char *map_base;
31 void *(*start)(void *);
36 struct __ptcb *cancelbuf;
41 #define __SU (sizeof(size_t)/sizeof(int))
43 #define _a_stacksize __u.__s[0]
44 #define _a_guardsize __u.__s[1]
45 #define _a_detach __u.__i[2*__SU+0]
46 #define _m_type __u.__i[0]
47 #define _m_lock __u.__i[1]
48 #define _m_waiters __u.__i[2]
49 #define _m_owner __u.__i[3]
50 #define _m_count __u.__i[4]
51 #define _c_block __u.__i[0]
52 #define _c_clock __u.__i[1]
53 #define _rw_wrlock __u.__i[0]
54 #define _rw_readers __u.__i[1]
55 #define _rw_waiters __u.__i[2]
56 #define _rw_owner __u.__i[3]
57 #define _b_count __u.__i[0]
58 #define _b_limit __u.__i[1]
59 #define _b_left __u.__i[2]
60 #define _b_waiters __u.__i[3]
62 #include "pthread_arch.h"
66 #define SIGTIMER 32 /* ?? */
68 int __set_thread_area(void *);
69 int __libc_sigaction(int, const struct sigaction *, struct sigaction *);
70 int __libc_sigprocmask(int, const sigset_t *, sigset_t *);
71 void __lock(volatile int *);
72 void __unmapself(void *, size_t);
74 int __timedwait(volatile int *, int, clockid_t, const struct timespec *, int);
75 void __wait(volatile int *, volatile int *, int, int);
76 void __wake(volatile int *, int, int);
78 #define DEFAULT_STACK_SIZE (16384-PAGE_SIZE)
79 #define DEFAULT_GUARD_SIZE PAGE_SIZE