diff options
author | mtm <mtm@FreeBSD.org> | 2003-05-25 08:35:37 +0000 |
---|---|---|
committer | mtm <mtm@FreeBSD.org> | 2003-05-25 08:35:37 +0000 |
commit | 94241277a7c9dc09ec3b0577288fb0c25b782043 (patch) | |
tree | 9b6297b8ba0a9925e192db8989f6e5fb4bcfc958 /lib/libthr/thread/thr_find_thread.c | |
parent | 9b84ee274a05a58268c2f9fcd1bac437c00cbbe3 (diff) | |
download | FreeBSD-src-94241277a7c9dc09ec3b0577288fb0c25b782043.zip FreeBSD-src-94241277a7c9dc09ec3b0577288fb0c25b782043.tar.gz |
Part of the last patch.
Modify the thread creation and thread searching routine
to lock the thread lists with the new locks instead of GIANT_LOCK.
Approved by: re/blanket libthr
Diffstat (limited to 'lib/libthr/thread/thr_find_thread.c')
-rw-r--r-- | lib/libthr/thread/thr_find_thread.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_find_thread.c b/lib/libthr/thread/thr_find_thread.c index 1b34f2f..bd51b8f 100644 --- a/lib/libthr/thread/thr_find_thread.c +++ b/lib/libthr/thread/thr_find_thread.c @@ -44,7 +44,7 @@ _find_thread(pthread_t pthread) if (pthread == NULL || pthread->magic != PTHREAD_MAGIC) return(EINVAL); - GIANT_LOCK(curthread); + THREAD_LIST_LOCK; /* Search for the specified thread: */ TAILQ_FOREACH(pthread1, &_thread_list, tle) { @@ -52,7 +52,7 @@ _find_thread(pthread_t pthread) break; } - GIANT_UNLOCK(curthread); + THREAD_LIST_UNLOCK; /* Return zero if the thread exists: */ return ((pthread1 != NULL) ? 0:ESRCH); |