diff options
| author | Jeff Roberson <jeff@FreeBSD.org> | 2008-02-07 06:16:54 +0000 |
|---|---|---|
| committer | Jeff Roberson <jeff@FreeBSD.org> | 2008-02-07 06:16:54 +0000 |
| commit | 0fef2c50b187b09f2148dfe52773ef0afc193152 (patch) | |
| tree | 45b0989b2a6fe389d2bd098eb117acfd14a7ac14 | |
| parent | fb73a5ab6c532984307b2688623f37b5028b973b (diff) | |
Notes
| -rw-r--r-- | sys/kern/kern_rwlock.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c index 4a1f8c776c6d..617316b53650 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -679,11 +679,11 @@ _rw_wunlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line) * of waiters or doing some complicated lock handoff gymnastics. */ v = RW_UNLOCKED; - if (rw->rw_lock & RW_LOCK_READ_WAITERS) { - queue = TS_SHARED_QUEUE; - v |= (rw->rw_lock & RW_LOCK_WRITE_WAITERS); - } else + if (rw->rw_lock & RW_LOCK_WRITE_WAITERS) { queue = TS_EXCLUSIVE_QUEUE; + v |= (rw->rw_lock & RW_LOCK_READ_WAITERS); + } else + queue = TS_SHARED_QUEUE; /* Wake up all waiters for the specific queue. */ if (LOCK_LOG_TEST(&rw->lock_object, 0)) |
