summaryrefslogtreecommitdiffstats
path: root/lib/libthr
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2003-12-12 09:51:39 +0000
committermtm <mtm@FreeBSD.org>2003-12-12 09:51:39 +0000
commit5d9c0f84f15849efcfcb9c59a12634239e2cbce4 (patch)
tree47564b6bec3481229d3d8dda5a4b1b26b95814c5 /lib/libthr
parentb8895524b0ff5a9c205e4b1813b1e9c8ee848947 (diff)
downloadFreeBSD-src-5d9c0f84f15849efcfcb9c59a12634239e2cbce4.zip
FreeBSD-src-5d9c0f84f15849efcfcb9c59a12634239e2cbce4.tar.gz
Doh! Lock the thread passed in by the caller, not the current thread.
Diffstat (limited to 'lib/libthr')
-rw-r--r--lib/libthr/thread/thr_resume_np.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_resume_np.c b/lib/libthr/thread/thr_resume_np.c
index 0269228..2699006 100644
--- a/lib/libthr/thread/thr_resume_np.c
+++ b/lib/libthr/thread/thr_resume_np.c
@@ -49,12 +49,12 @@ _pthread_resume_np(pthread_t thread)
/* Find the thread in the list of active threads: */
if ((ret = _find_thread(thread)) == 0) {
- _thread_critical_enter(curthread);
+ _thread_critical_enter(thread);
if ((thread->flags & PTHREAD_FLAGS_SUSPENDED) != 0)
resume_common(thread);
- _thread_critical_exit(curthread);
+ _thread_critical_exit(thread);
}
return (ret);
}
OpenPOWER on IntegriCloud