diff options
author | scottl <scottl@FreeBSD.org> | 2006-01-29 20:48:25 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2006-01-29 20:48:25 +0000 |
commit | 66db92c03ac235fcef88189e112e91c7c0250d47 (patch) | |
tree | 8dad1dfb5e7377389811acf8e0c7ea722549cc83 /sys/kern/kern_rwlock.c | |
parent | 9ab76a2a8bf87591799ef75a2d56805d12e94fa5 (diff) | |
download | FreeBSD-src-66db92c03ac235fcef88189e112e91c7c0250d47.zip FreeBSD-src-66db92c03ac235fcef88189e112e91c7c0250d47.tar.gz |
Take a stab at making this compile when WITNESS is not defined. gcc can't
figure out the order of operations at line 519, and neither can I, but this
is my best guess. Also correct a number of typos and syntax errors.
Diffstat (limited to 'sys/kern/kern_rwlock.c')
-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 d706284..fcbb6f7 100644 --- a/sys/kern/kern_rwlock.c +++ b/sys/kern/kern_rwlock.c @@ -515,11 +515,11 @@ _rw_assert(struct rwlock *rw, int what, const char *file, int line) * and are asserting a read lock, fail. Also, if no one * has a lock at all, fail. */ - if (rw->rw_lock == RW_UNLOCKED || - !(rw->rw_lock & RW_LOCK_READ) && (what == RW_RLOCKED || - RW_OWNER(rw) != (uintptr_t)curthread)) + if ((rw->rw_lock == RW_UNLOCKED || + !(rw->rw_lock & RW_LOCK_READ)) && (what == RA_RLOCKED || + (rw_owner(rw) != curthread))) panic("Lock %s not %slocked @ %s:%d\n", - rw->rw_object.lo_name, (what == RW_RLOCKED) ? + rw->rw_object.lo_name, (what == RA_RLOCKED) ? "read " : "", file, line); #endif break; |