mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-05 08:00:30 +00:00
Fix a bug recently introduced, the _thread_active_count should be
decreased if thread can not be created.
This commit is contained in:
parent
9cb4a7bd64
commit
1775714935
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154113
|
@ -190,6 +190,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
|
|||
}
|
||||
THR_THREAD_UNLOCK(curthread, new_thread);
|
||||
THREAD_LIST_LOCK(curthread);
|
||||
_thread_active_threads--;
|
||||
new_thread->tlflags |= TLFLAGS_DETACHED;
|
||||
_thr_ref_delete_unlocked(curthread, new_thread);
|
||||
THREAD_LIST_UNLOCK(curthread);
|
||||
|
|
Loading…
Reference in a new issue