summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_sig.c
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2008-04-29 03:58:18 +0000
committerdavidxu <davidxu@FreeBSD.org>2008-04-29 03:58:18 +0000
commit0e9d39ae8fb92317d5c01b606a5921f9b24b18f8 (patch)
tree526d411e9fd9b2fd964f111c6dd882d1ab4a5096 /lib/libthr/thread/thr_sig.c
parente43b7bfc16592e8563de4f6f5e200878f9efa80c (diff)
downloadFreeBSD-src-0e9d39ae8fb92317d5c01b606a5921f9b24b18f8.zip
FreeBSD-src-0e9d39ae8fb92317d5c01b606a5921f9b24b18f8.tar.gz
Use UMTX_OP_WAIT_UINT_PRIVATE and UMTX_OP_WAKE_PRIVATE to save
time in kernel(avoid VM lookup).
Diffstat (limited to 'lib/libthr/thread/thr_sig.c')
-rw-r--r--lib/libthr/thread/thr_sig.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c
index fe1555a..9615b06 100644
--- a/lib/libthr/thread/thr_sig.c
+++ b/lib/libthr/thread/thr_sig.c
@@ -89,7 +89,7 @@ _thr_ast(struct pthread *curthread)
void
_thr_suspend_check(struct pthread *curthread)
{
- long cycle;
+ uint32_t cycle;
int err;
if (curthread->force_exit)
@@ -114,7 +114,7 @@ _thr_suspend_check(struct pthread *curthread)
cycle = curthread->cycle;
/* Wake the thread suspending us. */
- _thr_umtx_wake(&curthread->cycle, INT_MAX);
+ _thr_umtx_wake(&curthread->cycle, INT_MAX, 0);
/*
* if we are from pthread_exit, we don't want to
@@ -124,7 +124,7 @@ _thr_suspend_check(struct pthread *curthread)
break;
curthread->flags |= THR_FLAGS_SUSPENDED;
THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock);
- _thr_umtx_wait(&curthread->cycle, cycle, NULL);
+ _thr_umtx_wait_uint(&curthread->cycle, cycle, NULL, 0);
THR_UMUTEX_LOCK(curthread, &(curthread)->lock);
curthread->flags &= ~THR_FLAGS_SUSPENDED;
}
OpenPOWER on IntegriCloud