X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Finternal%2Fpthread_impl.h;h=0f10cc48b116ff026fb59bf4dfd13deb0189deb3;hp=0ce3c1e8fd7a891fbdd3befff52bc95ebfe85c60;hb=dcd60371500a74d489372cac7240674c992c2484;hpb=819006a88b9473872fee91135b06f4e23231d97e diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h index 0ce3c1e8..0f10cc48 100644 --- a/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h @@ -22,19 +22,18 @@ struct pthread { struct pthread *self; - void *dtv, *unused1, *unused2; + void **dtv, *unused1, *unused2; uintptr_t sysinfo; uintptr_t canary; pid_t tid, pid; int tsd_used, errno_val, *errno_ptr; volatile int cancel, canceldisable, cancelasync; + int detached; unsigned char *map_base; size_t map_size; void *start_arg; void *(*start)(void *); void *result; - int detached; - int exitlock; struct __ptcb *cancelbuf; void **tsd; pthread_attr_t attr; @@ -47,7 +46,8 @@ struct pthread { int unblock_cancel; int delete_timer; locale_t locale; - int killlock; + int killlock[2]; + int exitlock[2]; }; struct __timer { @@ -90,9 +90,12 @@ struct __timer { #define SIGCANCEL 33 #define SIGSYNCCALL 34 -#define SIGPT_SET ((sigset_t *)(unsigned long [1+(sizeof(long)==4)]){ \ +#define SIGALL_SET ((sigset_t *)(const unsigned long long [2]){ -1,-1 }) +#define SIGPT_SET \ + ((sigset_t *)(const unsigned long [__SYSCALL_SSLEN/sizeof(long)]){ \ [sizeof(long)==4] = 3UL<<(32*(sizeof(long)>4)) }) -#define SIGTIMER_SET ((sigset_t *)(unsigned long [1+(sizeof(long)==4)]){ \ +#define SIGTIMER_SET \ + ((sigset_t *)(const unsigned long [__SYSCALL_SSLEN/sizeof(long)]){ \ 0x80000000 }) pthread_t __pthread_self_init(void); @@ -108,8 +111,9 @@ int __timedwait(volatile int *, int, clockid_t, const struct timespec *, void (* void __wait(volatile int *, volatile int *, int, int); void __wake(volatile int *, int, int); -void __synccall_lock(); -void __synccall_unlock(); +void __acquire_ptc(); +void __release_ptc(); +void __inhibit_ptc(); #define DEFAULT_STACK_SIZE 81920 #define DEFAULT_GUARD_SIZE PAGE_SIZE