diff options
author | Scott Long <scottl@FreeBSD.org> | 2006-01-29 20:48:25 +0000 |
---|---|---|
committer | Scott Long <scottl@FreeBSD.org> | 2006-01-29 20:48:25 +0000 |
commit | 8ad6b7ab7c5706d2590267a99edbcd41968af606 (patch) | |
tree | 8dad1dfb5e7377389811acf8e0c7ea722549cc83 /sys | |
parent | 1a4eb4edacf623a12764e25bbba0e25099423db2 (diff) | |
download | src-8ad6b7ab7c5706d2590267a99edbcd41968af606.tar.gz src-8ad6b7ab7c5706d2590267a99edbcd41968af606.zip |
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.
Notes
Notes:
svn path=/head/; revision=155012
Diffstat (limited to 'sys')
-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 d706284a93ce..fcbb6f77193a 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; |