Skip to main content

assert_no_locks_held

Function assert_no_locks_held 

Source
pub fn assert_no_locks_held()
Expand description

Asserts that the current thread holds no tracked locks.

When lock validation is enabled, this checks the current thread’s lock state and panics or generates a kernel oops if any tracked locks are held. When lock validation is disabled, this is a zero-cost no-op.