diff options
author | mtm <mtm@FreeBSD.org> | 2003-05-26 00:37:07 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-05-26 00:37:07 +0000 |
commit | 23f766944414893832e8a3d10afbceded194916f (patch) | |
tree | 4913d71c40094f5da6427b152c90be36f35dfdd6 /lib/libthr/thread/thr_stack.c | |
parent | 3440accd67bef89b04b9c16c578fd05c6de445b3 (diff) | |
download | FreeBSD-src-23f766944414893832e8a3d10afbceded194916f.zip FreeBSD-src-23f766944414893832e8a3d10afbceded194916f.tar.gz |
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
Diffstat (limited to 'lib/libthr/thread/thr_stack.c')
-rw-r--r-- | lib/libthr/thread/thr_stack.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libthr/thread/thr_stack.c b/lib/libthr/thread/thr_stack.c index 28b396b..b4063ad 100644 --- a/lib/libthr/thread/thr_stack.c +++ b/lib/libthr/thread/thr_stack.c @@ -144,7 +144,7 @@ _thread_stack_alloc(size_t stacksize, size_t guardsize) * Use the garbage collector mutex for synchronization of the * spare stack list. */ - DEAD_LIST_LOCK; + STACK_LOCK; if ((spare_stack = LIST_FIRST(&_dstackq)) != NULL) { /* Use the spare stack. */ @@ -153,7 +153,7 @@ _thread_stack_alloc(size_t stacksize, size_t guardsize) } /* Unlock the garbage collector mutex. */ - DEAD_LIST_UNLOCK; + STACK_UNLOCK; } /* * The user specified a non-default stack and/or guard size, so try to @@ -165,7 +165,7 @@ _thread_stack_alloc(size_t stacksize, size_t guardsize) * Use the garbage collector mutex for synchronization of the * spare stack list. */ - DEAD_LIST_LOCK; + STACK_LOCK; LIST_FOREACH(spare_stack, &_mstackq, qe) { if (spare_stack->stacksize == stack_size && @@ -177,7 +177,7 @@ _thread_stack_alloc(size_t stacksize, size_t guardsize) } /* Unlock the garbage collector mutex. */ - DEAD_LIST_UNLOCK; + STACK_UNLOCK; } /* Check if a stack was not allocated from a stack cache: */ |