1 #ifndef _PTHREAD_IMPL_H
2 #define _PTHREAD_IMPL_H
20 #define pthread __pthread
23 struct pthread *self, *join;
26 volatile int canceldisable, cancelasync, cancelpoint, cancel;
27 unsigned char *map_base;
30 void *(*start)(void *);
35 unsigned long tlsdesc[4];
36 struct __ptcb *cancelbuf;
43 static inline struct pthread *__pthread_self()
46 __asm__ ("movl %%gs:0,%0" : "=r" (self) );
52 #define SIGTIMER 32 /* ?? */
54 int __set_thread_area(unsigned long *);
55 int __set_pthread_self(void *);
56 int __libc_sigaction(int, const struct sigaction *, struct sigaction *);
57 int __libc_sigprocmask(int, const sigset_t *, sigset_t *);
58 void __lock(volatile int *);
59 void __unmapself(void *, size_t);
61 int __timedwait(volatile int *, int, clockid_t, const struct timespec *, int);
62 void __wait(volatile int *, volatile int *, int, int);
63 void __wake(volatile int *, int, int);
65 #define DEFAULT_STACK_SIZE (16384-PAGE_SIZE)
66 #define DEFAULT_GUARD_SIZE PAGE_SIZE