X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Fpthread_impl.h;h=615af7083325f57f2ab16762fc9d474dc12385ce;hp=d751f197fde08a22e323bb5a52ddbee1ec6ed1fd;hb=e882756311c7b06e59fcc8e582f03852b7dcfd30;hpb=0b2006c8fea021b7fa1fd267bf270cb8c279f230 diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index d751f197..615af708 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -38,19 +38,32 @@ struct pthread { pthread_attr_t attr; }; -static inline struct pthread *__pthread_self() -{ - struct pthread *self; - __asm__ ("movl %%gs:0,%0" : "=r" (self) ); - return self; -} +#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 #define SIGSYSCALL 33 #define SIGTIMER 32 /* ?? */ -int __set_thread_area(unsigned long *); -int __set_pthread_self(void *); +int __set_thread_area(void *); int __libc_sigaction(int, const struct sigaction *, struct sigaction *); int __libc_sigprocmask(int, const sigset_t *, sigset_t *); void __lock(volatile int *);