6 #include "pthread_impl.h"
8 static void dummy(int x)
12 weak_alias(dummy, __fork_handler);
13 weak_alias(dummy, __aio_atfork);
20 __block_all_sigs(&set);
23 ret = __syscall(SYS_fork);
25 ret = __syscall(SYS_clone, SIGCHLD, 0);
28 pthread_t self = __pthread_self();
29 self->tid = __syscall(SYS_gettid);
30 self->robust_list.off = 0;
31 self->robust_list.pending = 0;
32 self->next = self->prev = self;
33 __thread_list_lock = 0;
34 libc.threads_minus_1 = 0;
35 if (libc.need_locks) libc.need_locks = -1;
40 return __syscall_ret(ret);