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;
42 #define __SU (sizeof(size_t)/sizeof(int))
44 #define _a_stacksize __u.__s[0]
45 #define _a_guardsize __u.__s[1]
46 #define _a_detach __u.__i[2*__SU+0]
47 #define _m_type __u.__i[0]
48 #define _m_lock __u.__i[1]
49 #define _m_waiters __u.__i[2]
50 #define _m_owner __u.__i[3]
51 #define _m_count __u.__i[4]
52 #define _c_block __u.__i[0]
53 #define _c_clock __u.__i[1]
54 #define _rw_wrlock __u.__i[0]
55 #define _rw_readers __u.__i[1]
56 #define _rw_waiters __u.__i[2]
57 #define _rw_owner __u.__i[3]
58 #define _b_count __u.__i[0]
59 #define _b_limit __u.__i[1]
60 #define _b_left __u.__i[2]
61 #define _b_waiters __u.__i[3]
63 #include "pthread_arch.h"
67 #define SIGTIMER 32 /* ?? */
69 int __set_thread_area(void *);
70 int __libc_sigaction(int, const struct sigaction *, struct sigaction *);
71 int __libc_sigprocmask(int, const sigset_t *, sigset_t *);
72 void __lock(volatile int *);
73 void __unmapself(void *, size_t);
75 int __timedwait(volatile int *, int, clockid_t, const struct timespec *, int);
76 void __wait(volatile int *, volatile int *, int, int);
77 void __wake(volatile int *, int, int);
79 #define DEFAULT_STACK_SIZE (16384-PAGE_SIZE)
80 #define DEFAULT_GUARD_SIZE PAGE_SIZE