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.
This commit is contained in:
parent
1a4eb4edac
commit
8ad6b7ab7c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user