diff options
author | davidxu <davidxu@FreeBSD.org> | 2006-01-08 10:13:18 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2006-01-08 10:13:18 +0000 |
commit | 6f27a53b6f2b9f17b4144b5da54af97bb6d66991 (patch) | |
tree | 017b23a98811d0229e0d7b316816d70aa2494736 /lib/libthr/thread/thr_create.c | |
parent | 4f9a9122c65d8ecf1b8eadef2ceaa8db0a6e0acb (diff) | |
download | FreeBSD-src-6f27a53b6f2b9f17b4144b5da54af97bb6d66991.zip FreeBSD-src-6f27a53b6f2b9f17b4144b5da54af97bb6d66991.tar.gz |
Fix a bug recently introduced, the _thread_active_count should be
decreased if thread can not be created.
Diffstat (limited to 'lib/libthr/thread/thr_create.c')
-rw-r--r-- | lib/libthr/thread/thr_create.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index cc0d84e..6b67f4e 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); |