Use the mtx_owner() macro in one spot in _mtx_lock_sleep() to make the

code easier to read.
This commit is contained in:
John Baldwin 2002-02-09 00:12:53 +00:00
parent 1f3030b053
commit 18fc2ba9ff
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {