From 1775714935c99700223786a8fd1442e29015f385 Mon Sep 17 00:00:00 2001 From: David Xu Date: Sun, 8 Jan 2006 10:13:18 +0000 Subject: [PATCH] Fix a bug recently introduced, the _thread_active_count should be decreased if thread can not be created. --- lib/libthr/thread/thr_create.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index cc0d84e46cd..6b67f4ea930 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -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);