static int init_main_thread()
{
+ __syscall(SYS_rt_sigprocmask, SIG_UNBLOCK, SIGPT_SET, 0, 8);
if (__set_thread_area(&main_thread) < 0) return -1;
main_thread.canceldisable = libc.canceldisable;
main_thread.tsd = (void **)__pthread_tsd_main;
return 0;
}
-pthread_t pthread_self()
+pthread_t __pthread_self_def()
{
static int init, failed;
if (!init) {
return __pthread_self();
}
-weak_alias(pthread_self, __pthread_self_init);
+weak_alias(__pthread_self_def, pthread_self);
+weak_alias(__pthread_self_def, __pthread_self_init);