PERFORCE change 67992 for review
David Xu
davidxu at FreeBSD.org
Fri Dec 31 07:08:26 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=67992
Change 67992 by davidxu at davidxu_tiger on 2004/12/31 15:07:44
use THREAD_LIST_LOCK, THREAD_LIST_UNLOCK macro.
Affected files ...
.. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_stack.c#3 edit
Differences ...
==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_stack.c#3 (text+ko) ====
@@ -152,7 +152,7 @@
* Use the garbage collector lock for synchronization of the
* spare stack lists and allocations from usrstack.
*/
- THR_LOCK_ACQUIRE(curthread, &_thread_list_lock);
+ THREAD_LIST_LOCK(curthread);
/*
* If the stack and guard sizes are default, try to allocate a stack
* from the default-size stack cache:
@@ -182,7 +182,7 @@
}
if (attr->stackaddr_attr != NULL) {
/* A cached stack was found. Release the lock. */
- THR_LOCK_RELEASE(curthread, &_thread_list_lock);
+ THREAD_LIST_UNLOCK(curthread);
}
else {
/* Allocate a stack from usrstack. */
@@ -203,7 +203,7 @@
last_stack -= (stacksize + guardsize);
/* Release the lock before mmap'ing it. */
- THR_LOCK_RELEASE(curthread, &_thread_list_lock);
+ THREAD_LIST_UNLOCK(curthread);
/* Map the stack and guard page together, and split guard
page from allocated space: */
More information about the p4-projects
mailing list