pub(crate) struct LockdepState {
depth: usize,
held: [HeldLock; 6],
}Expand description
Per-CPU lockdep state, active only under cfg(debug_assertions).
Fields§
§depth: usize§held: [HeldLock; 6]Implementations§
Source§impl LockdepState
impl LockdepState
pub(crate) const fn new() -> Self
Sourcepub(crate) fn acquire(
&mut self,
rank: LockRank,
cpu: Option<usize>,
caller: usize,
)
pub(crate) fn acquire( &mut self, rank: LockRank, cpu: Option<usize>, caller: usize, )
Record a lock acquisition. Panics in debug if ordering is violated.
Sourcepub(crate) fn assert_no_scheduler_locks(&self)
pub(crate) fn assert_no_scheduler_locks(&self)
Assert that no scheduler lock is held.
Sourcepub(crate) fn assert_held(&self, rank: LockRank)
pub(crate) fn assert_held(&self, rank: LockRank)
Assert that a specific rank is currently held.
Sourcepub(crate) fn current_depth(&self) -> usize
pub(crate) fn current_depth(&self) -> usize
Return the current depth.
Auto Trait Implementations§
impl Freeze for LockdepState
impl RefUnwindSafe for LockdepState
impl Send for LockdepState
impl Sync for LockdepState
impl Unpin for LockdepState
impl UnsafeUnpin for LockdepState
impl UnwindSafe for LockdepState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more