diff options
author | davidxu <davidxu@FreeBSD.org> | 2004-12-25 12:49:35 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2004-12-25 12:49:35 +0000 |
commit | 7b03c7ecc4225f3c91f0ca8226a08c5f578c1baa (patch) | |
tree | 362edeca7663f30de9ad99278f01a8f81a939df1 /sys/kern | |
parent | aa3fdaa2efc844f93870359e85ba1f69d94ee3ad (diff) | |
download | FreeBSD-src-7b03c7ecc4225f3c91f0ca8226a08c5f578c1baa.zip FreeBSD-src-7b03c7ecc4225f3c91f0ca8226a08c5f578c1baa.tar.gz |
1. introduce umtx_owner to get an owner of a umtx.
2. add const qualifier to umtx_timedlock and umtx_timedwait.
3. add missing blackets in umtx do_unlock_and_wait.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_umtx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 3bc3a78..e00b9a6 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -95,8 +95,6 @@ struct umtxq_chain { static struct umtxq_chain umtxq_chains[UMTX_CHAINS]; static MALLOC_DEFINE(M_UMTX, "umtx", "UMTX queue memory"); -#define UMTX_CONTESTED LONG_MIN - static void umtxq_init_chains(void *); static int umtxq_hash(struct umtx_key *key); static struct mtx *umtxq_mtx(int chain); @@ -682,7 +680,7 @@ do_unlock_and_wait(struct thread *td, struct umtx *umtx, long id, void *uaddr, error = umtxq_sleep(td, &uq.uq_key, td->td_priority | PCATCH, "ucond", timo); - if (!td->td_flags & TDF_UMTXQ) + if (!(td->td_flags & TDF_UMTXQ)) break; umtxq_unlock(&uq.uq_key); } |