kernel/locks: Add another assertion to _rw_lock_unset_read_locked.
This method is only used when KDEBUG_RW_LOCK_DEBUG is enabled, which it isn't by default (even when KDEBUG is.)
This commit is contained in:
@@ -477,6 +477,7 @@ _rw_lock_set_read_locked(rw_lock* lock)
|
|||||||
thread->held_read_locks[i] = lock;
|
thread->held_read_locks[i] = lock;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
panic("too many read locks!");
|
panic("too many read locks!");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,6 +493,8 @@ _rw_lock_unset_read_locked(rw_lock* lock)
|
|||||||
thread->held_read_locks[i] = NULL;
|
thread->held_read_locks[i] = NULL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
panic("_rw_lock_unset_read_locked(): lock %p not read-locked by current thread", lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user