Fix a bug recently introduced, the _thread_active_count should be

decreased if thread can not be created.
This commit is contained in:
David Xu 2006-01-08 10:13:18 +00:00
parent 9cb4a7bd64
commit 1775714935
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154113

View file

@ -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);