summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_rwlock.c
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2006-01-29 20:48:25 +0000
committerscottl <scottl@FreeBSD.org>2006-01-29 20:48:25 +0000
commit66db92c03ac235fcef88189e112e91c7c0250d47 (patch)
tree8dad1dfb5e7377389811acf8e0c7ea722549cc83 /sys/kern/kern_rwlock.c
parent9ab76a2a8bf87591799ef75a2d56805d12e94fa5 (diff)
downloadFreeBSD-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.c8
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;
OpenPOWER on IntegriCloud