mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 13:52:28 +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;
|
errno = e;
|
||||||
return EAGAIN;
|
return EAGAIN;
|
||||||
}
|
}
|
||||||
|
dll_init(&pt->list);
|
||||||
pt->pt_start = start_routine;
|
pt->pt_start = start_routine;
|
||||||
pt->pt_arg = arg;
|
pt->pt_arg = arg;
|
||||||
|
|
||||||
|
@ -289,7 +290,6 @@ static errno_t pthread_create_impl(pthread_t *thread,
|
||||||
|
|
||||||
// add thread to global list
|
// add thread to global list
|
||||||
// we add it to the beginning since zombies go at the end
|
// we add it to the beginning since zombies go at the end
|
||||||
dll_init(&pt->list);
|
|
||||||
_pthread_lock();
|
_pthread_lock();
|
||||||
dll_make_first(&_pthread_list, &pt->list);
|
dll_make_first(&_pthread_list, &pt->list);
|
||||||
_pthread_unlock();
|
_pthread_unlock();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue