summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Makonnen <mtm@FreeBSD.org>2003-05-29 20:40:50 +0000
committerMike Makonnen <mtm@FreeBSD.org>2003-05-29 20:40:50 +0000
commit981f4968f09101e148b2fd8f1389d087948bc00c (patch)
treed8e91c9705dd9188702af23f722517e4ccbc0ccb
parente5cd12556d4e0b8ec3aa41eb27efd5fb05d15115 (diff)
Notes
-rw-r--r--lib/libthr/thread/thr_create.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c
index c86f2446a5306..0b085625c1353 100644
--- a/lib/libthr/thread/thr_create.c
+++ b/lib/libthr/thread/thr_create.c
@@ -171,7 +171,6 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->uniqueid = next_uniqueid++;
THREAD_LIST_LOCK;
- _thread_critical_enter(new_thread);
/*
* Check if the garbage collector thread
@@ -182,8 +181,6 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
/* Add the thread to the linked list of all threads: */
TAILQ_INSERT_HEAD(&_thread_list, new_thread, tle);
- THREAD_LIST_UNLOCK;
-
/*
* Create the thread.
*
@@ -200,11 +197,11 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
PANIC("thr_create");
}
+ THREAD_LIST_UNLOCK;
+
/* Return a pointer to the thread structure: */
(*thread) = new_thread;
- _thread_critical_exit(new_thread);
-
/*
* Start a garbage collector thread
* if necessary.