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:
Augustin Cavalier
2024-09-10 17:05:12 -04:00
parent 0d931e6321
commit 1e13801271
+3
View File
@@ -477,6 +477,7 @@ _rw_lock_set_read_locked(rw_lock* lock)
thread->held_read_locks[i] = lock;
return;
}
panic("too many read locks!");
}
@@ -492,6 +493,8 @@ _rw_lock_unset_read_locked(rw_lock* lock)
thread->held_read_locks[i] = NULL;
return;
}
panic("_rw_lock_unset_read_locked(): lock %p not read-locked by current thread", lock);
}
#endif