projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
report that posix_spawn is supported in unistd.h and sysconf
[musl]
/
src
/
thread
/
pthread_self.c
diff --git
a/src/thread/pthread_self.c
b/src/thread/pthread_self.c
index
23dbaa5
..
aed4b5f
100644
(file)
--- a/
src/thread/pthread_self.c
+++ b/
src/thread/pthread_self.c
@@
-9,7
+9,7
@@
weak_alias(dummy, __pthread_tsd_main);
static int init_main_thread()
{
__syscall(SYS_rt_sigprocmask, SIG_UNBLOCK,
static int init_main_thread()
{
__syscall(SYS_rt_sigprocmask, SIG_UNBLOCK,
- SIGPT_SET, 0, _
_SYSCALL_SSLEN
);
+ SIGPT_SET, 0, _
NSIG/8
);
if (__set_thread_area(TP_ADJ(main_thread)) < 0) return -1;
main_thread->canceldisable = libc.canceldisable;
main_thread->tsd = (void **)__pthread_tsd_main;
if (__set_thread_area(TP_ADJ(main_thread)) < 0) return -1;
main_thread->canceldisable = libc.canceldisable;
main_thread->tsd = (void **)__pthread_tsd_main;
@@
-17,6
+17,8
@@
static int init_main_thread()
main_thread->self = main_thread;
main_thread->tid = main_thread->pid =
__syscall(SYS_set_tid_address, &main_thread->tid);
main_thread->self = main_thread;
main_thread->tid = main_thread->pid =
__syscall(SYS_set_tid_address, &main_thread->tid);
+ if (!main_thread->dtv)
+ main_thread->dtv = (void *)dummy;
libc.main_thread = main_thread;
return 0;
}
libc.main_thread = main_thread;
return 0;
}