aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2006-01-29 20:48:25 +0000
committerScott Long <scottl@FreeBSD.org>2006-01-29 20:48:25 +0000
commit8ad6b7ab7c5706d2590267a99edbcd41968af606 (patch)
tree8dad1dfb5e7377389811acf8e0c7ea722549cc83 /sys
parent1a4eb4edacf623a12764e25bbba0e25099423db2 (diff)
downloadsrc-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.c8
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;