summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_join.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-07-06 10:18:48 +0000
committermtm <mtm@FreeBSD.org>2003-07-06 10:18:48 +0000
commit2ced154094b1ba76e51108eff45803f60f6731ce (patch)
tree314e5a3ea0c37ba2ab164337eae32bb02e9f5383 /lib/libthr/thread/thr_join.c
parentd4808894e4846559ec5d35948da89927a1034b33 (diff)
downloadFreeBSD-src-2ced154094b1ba76e51108eff45803f60f6731ce.zip
FreeBSD-src-2ced154094b1ba76e51108eff45803f60f6731ce.tar.gz
Change all instances of THR_LOCK/UNLOCK, etc to UMTX_*.
It is a more acurate description of the locks they operate on.
Diffstat (limited to 'lib/libthr/thread/thr_join.c')
-rw-r--r--lib/libthr/thread/thr_join.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libthr/thread/thr_join.c b/lib/libthr/thread/thr_join.c
index ed03367..30acc93 100644
--- a/lib/libthr/thread/thr_join.c
+++ b/lib/libthr/thread/thr_join.c
@@ -70,7 +70,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
THREAD_LIST_LOCK;
TAILQ_FOREACH(thread, &_thread_list, tle)
if (thread == pthread) {
- THR_LOCK(&pthread->lock);
+ UMTX_LOCK(&pthread->lock);
break;
}
@@ -80,7 +80,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
*/
TAILQ_FOREACH(thread, &_dead_list, dle)
if (thread == pthread) {
- THR_LOCK(&pthread->lock);
+ UMTX_LOCK(&pthread->lock);
break;
}
@@ -88,7 +88,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
if (thread == NULL ||
((pthread->attr.flags & PTHREAD_DETACHED) != 0)) {
if (thread != NULL)
- THR_UNLOCK(&pthread->lock);
+ UMTX_UNLOCK(&pthread->lock);
THREAD_LIST_UNLOCK;
DEAD_LIST_UNLOCK;
ret = ESRCH;
@@ -98,7 +98,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
if (pthread->joiner != NULL) {
/* Multiple joiners are not supported. */
/* XXXTHR - support multiple joiners. */
- THR_UNLOCK(&pthread->lock);
+ UMTX_UNLOCK(&pthread->lock);
THREAD_LIST_UNLOCK;
DEAD_LIST_UNLOCK;
ret = ENOTSUP;
@@ -110,7 +110,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
if (pthread->state != PS_DEAD) {
/* Set the running thread to be the joiner: */
pthread->joiner = curthread;
- THR_UNLOCK(&pthread->lock);
+ UMTX_UNLOCK(&pthread->lock);
_thread_critical_enter(curthread);
/* Keep track of which thread we're joining to: */
@@ -162,7 +162,7 @@ _pthread_join(pthread_t pthread, void **thread_return)
/* Make the thread collectable by the garbage collector. */
pthread->attr.flags |= PTHREAD_DETACHED;
- THR_UNLOCK(&pthread->lock);
+ UMTX_UNLOCK(&pthread->lock);
THREAD_LIST_UNLOCK;
if (pthread_cond_signal(&_gc_cond) != 0)
PANIC("Cannot signal gc cond");
OpenPOWER on IntegriCloud