]>
git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/process/_Fork.c
6 #include "pthread_impl.h"
9 static void dummy(int x
) { }
10 weak_alias(dummy
, __aio_atfork
);
16 __block_all_sigs(&set
);
20 ret
= __syscall(SYS_fork
);
22 ret
= __syscall(SYS_clone
, SIGCHLD
, 0);
25 pthread_t self
= __pthread_self();
26 self
->tid
= __syscall(SYS_gettid
);
27 self
->robust_list
.off
= 0;
28 self
->robust_list
.pending
= 0;
29 self
->next
= self
->prev
= self
;
30 __thread_list_lock
= 0;
31 libc
.threads_minus_1
= 0;
32 if (libc
.need_locks
) libc
.need_locks
= -1;
37 return __syscall_ret(ret
);