7 #include "pthread_impl.h"
9 static void dummy(int x)
13 weak_alias(dummy, __fork_handler);
14 weak_alias(dummy, __aio_atfork);
21 __block_all_sigs(&set);
25 ret = __syscall(SYS_fork);
27 ret = __syscall(SYS_clone, SIGCHLD, 0);
30 pthread_t self = __pthread_self();
31 self->tid = __syscall(SYS_gettid);
32 self->robust_list.off = 0;
33 self->robust_list.pending = 0;
34 self->next = self->prev = self;
35 __thread_list_lock = 0;
36 libc.threads_minus_1 = 0;
37 if (libc.need_locks) libc.need_locks = -1;
43 return __syscall_ret(ret);