From 23f766944414893832e8a3d10afbceded194916f Mon Sep 17 00:00:00 2001 From: mtm Date: Mon, 26 May 2003 00:37:07 +0000 Subject: Decouple the thread stack [de]allocating functions from the 'dead threads list' lock. It's not really necessary and we don't need the added complexity or potential for deadlocks. Approved by: re/blanket libthr --- lib/libthr/thread/thr_create.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/libthr/thread/thr_create.c') diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c index 5b0158d..c86f244 100644 --- a/lib/libthr/thread/thr_create.c +++ b/lib/libthr/thread/thr_create.c @@ -119,11 +119,10 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->arch_id = _set_curthread(&new_thread->ctx, new_thread, &ret); if (ret != 0) { if (pattr->stackaddr_attr == NULL) { - /* XXX - We really need to decouple from this lock */ - DEAD_LIST_LOCK; + STACK_LOCK; _thread_stack_free(new_thread->stack, pattr->stacksize_attr, pattr->guardsize_attr); - DEAD_LIST_UNLOCK; + STACK_UNLOCK; } free(new_thread); return (ret); -- cgit v1.1