6 #include "pthread_impl.h"
9 static void dummy(int x) { }
10 weak_alias(dummy, __aio_atfork);
16 __block_all_sigs(&set);
19 ret = __syscall(SYS_fork);
21 ret = __syscall(SYS_clone, SIGCHLD, 0);
24 pthread_t self = __pthread_self();
25 self->tid = __syscall(SYS_set_tid_address, &__thread_list_lock);
26 self->robust_list.off = 0;
27 self->robust_list.pending = 0;
28 self->next = self->prev = self;
29 __thread_list_lock = 0;
30 libc.threads_minus_1 = 0;
31 if (libc.need_locks) libc.need_locks = -1;
34 if (!ret) __aio_atfork(1);
36 return __syscall_ret(ret);