mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 06:53:33 +00:00
Fix assertion error in pthread_create()
This commit is contained in:
parent
51cd83f674
commit
8ebe2e9020
1 changed files with 1 additions and 1 deletions
|
@ -175,6 +175,7 @@ static errno_t pthread_create_impl(pthread_t *thread,
|
|||
errno = e;
|
||||
return EAGAIN;
|
||||
}
|
||||
dll_init(&pt->list);
|
||||
pt->pt_start = start_routine;
|
||||
pt->pt_arg = arg;
|
||||
|
||||
|
@ -289,7 +290,6 @@ static errno_t pthread_create_impl(pthread_t *thread,
|
|||
|
||||
// add thread to global list
|
||||
// we add it to the beginning since zombies go at the end
|
||||
dll_init(&pt->list);
|
||||
_pthread_lock();
|
||||
dll_make_first(&_pthread_list, &pt->list);
|
||||
_pthread_unlock();
|
||||
|
|
Loading…
Reference in a new issue