clean up handling of thread/nothread mode, locking
This commit is contained in:
parent
eb0e8fa0b1
commit
9080cc153c
8 changed files with 16 additions and 27 deletions
|
|
@ -8,7 +8,7 @@ pid_t fork(void)
|
|||
pid_t ret;
|
||||
if (libc.fork_handler) libc.fork_handler(-1);
|
||||
ret = syscall(SYS_fork);
|
||||
if (libc.lock && !ret) {
|
||||
if (libc.threaded && !ret) {
|
||||
pthread_t self = __pthread_self();
|
||||
self->tid = self->pid = syscall(SYS_getpid);
|
||||
libc.threads_minus_1 = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue