6 #include "pthread_impl.h"
10 static void dummy(int x) { }
11 weak_alias(dummy, __aio_atfork);
13 void __post_Fork(int ret)
16 pthread_t self = __pthread_self();
17 self->tid = __syscall(SYS_set_tid_address, &__thread_list_lock);
18 self->robust_list.off = 0;
19 self->robust_list.pending = 0;
20 self->next = self->prev = self;
21 __thread_list_lock = 0;
22 libc.threads_minus_1 = 0;
23 if (libc.need_locks) libc.need_locks = -1;
26 if (!ret) __aio_atfork(1);
33 __block_all_sigs(&set);
36 ret = __syscall(SYS_fork);
38 ret = __syscall(SYS_clone, SIGCHLD, 0);
42 return __syscall_ret(ret);