diff options
author | jhb <jhb@FreeBSD.org> | 2002-02-09 00:12:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2002-02-09 00:12:53 +0000 |
commit | 340b988d0be8a5b0460cba8c25ce2ed5fedd7ec2 (patch) | |
tree | 3a1a880b6a8eff06761fff8661b545f0604421fb /sys/kern | |
parent | 3d4000737f327f0e20f0e01f3d6f6a378ff741f2 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/kern/kern_mutex.c | 2 | ||||
-rw-r--r-- | sys/kern/subr_turnstile.c | 2 |
2 files changed, 2 insertions, 2 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 { diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 6167185..d5e5f93 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.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 { |