summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_mutex.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2002-02-09 00:12:53 +0000
committerjhb <jhb@FreeBSD.org>2002-02-09 00:12:53 +0000
commit340b988d0be8a5b0460cba8c25ce2ed5fedd7ec2 (patch)
tree3a1a880b6a8eff06761fff8661b545f0604421fb /sys/kern/kern_mutex.c
parent3d4000737f327f0e20f0e01f3d6f6a378ff741f2 (diff)
downloadFreeBSD-src-340b988d0be8a5b0460cba8c25ce2ed5fedd7ec2.zip
FreeBSD-src-340b988d0be8a5b0460cba8c25ce2ed5fedd7ec2.tar.gz
Use the mtx_owner() macro in one spot in _mtx_lock_sleep() to make the
code easier to read.
Diffstat (limited to 'sys/kern/kern_mutex.c')
-rw-r--r--sys/kern/kern_mutex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 6167185..d5e5f93 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -372,7 +372,7 @@ _mtx_lock_sleep(struct mtx *m, int opts, const char *file, int line)
* Put us on the list of threads blocked on this mutex.
*/
if (TAILQ_EMPTY(&m->mtx_blocked)) {
- td1 = (struct thread *)(m->mtx_lock & MTX_FLAGMASK);
+ td1 = mtx_owner(m);
LIST_INSERT_HEAD(&td1->td_contested, m, mtx_contested);
TAILQ_INSERT_TAIL(&m->mtx_blocked, td, td_blkq);
} else {
OpenPOWER on IntegriCloud