Skip to main content

LockdepTracked

Struct LockdepTracked 

Source
pub struct LockdepTracked<L: RawLock, P = <L as RawLock>::DefaultPolicy, const LOCK_FLAGS: LockFlags = { lockdep::LOCK_FLAGS_NONE }> { /* private fields */ }
Expand description

Wraps a RawLock and LockPolicy with optional lockdep tracking state.

Implementations§

Source§

impl<L: RawLock, P, const LOCK_FLAGS: LockFlags> LockdepTracked<L, P, LOCK_FLAGS>

Source

pub fn project<'__pin>( self: Pin<&'__pin mut Self>, ) -> LockdepTrackedProjection<'__pin, L, P, LOCK_FLAGS>

Pin-projects all fields of Self.

These fields are structurally pinned:

  • lock

These fields are not structurally pinned:

  • class_id
  • _policy
Source§

impl<L: RawLock, P, const LOCK_FLAGS: LockFlags> LockdepTracked<L, P, LOCK_FLAGS>

Source

pub const LOCK_FLAGS: LockFlags = LOCK_FLAGS

Flags specifying validation rules for the lock class.

Source§

impl<L: ConstRawLock, P, const LOCK_FLAGS: LockFlags> LockdepTracked<L, P, LOCK_FLAGS>

Source

pub const INIT: Self

Source

pub const fn const_init(_class_id: *const c_void) -> Self

Statically initializes a LockdepTracked lock in constant context.

Trait Implementations§

Source§

impl<L: ConstRawLock, P: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> ConstRawLock for LockdepTracked<L, P, LOCK_FLAGS>

Source§

const INIT: Self = Self::INIT

Constant-initialized value for the lock.
Source§

impl<L: ConstRawLock, P, const LOCK_FLAGS: LockFlags> Default for LockdepTracked<L, P, LOCK_FLAGS>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<L: RawLock, P, const LOCK_FLAGS: LockFlags> Deref for LockdepTracked<L, P, LOCK_FLAGS>

Source§

type Target = L

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl<L: RawLock, P: ExclusiveLockPolicy<L>, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> ExclusiveLockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for LockdepTracked<L, P, LOCK_FLAGS>

Source§

impl<L: RawLock, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> ExclusiveLockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for IrqSavePolicy

Source§

impl<L: RawLock, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> ExclusiveLockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for NoIrqSavePolicy

Source§

impl<L: RawLock, P, const LOCK_FLAGS: LockFlags> HasPinData for LockdepTracked<L, P, LOCK_FLAGS>

Source§

type PinData = __ThePinData<L, P, LOCK_FLAGS>

Source§

unsafe fn __pin_data() -> Self::PinData

Source§

impl<L: RawLock, P: LockPolicy<L>, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> LockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for LockdepTracked<L, P, LOCK_FLAGS>

Source§

type AcquireArgs = <P as LockPolicy<L>>::AcquireArgs

Arguments passed when acquiring the lock under this policy.
Source§

type GuardState = LockdepTrackedGuardState<<P as LockPolicy<L>>::GuardState>

State stored in the pinned guard across lock acquisition and release.
Source§

unsafe fn pre_validate( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Performs any pre-validation setup (such as disabling and saving interrupts) before lockdep validation runs. Read more
Source§

unsafe fn pre_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-runs pre-validation on an existing GuardState before re-acquiring the lock (e.g. in call_unlocked). Read more
Source§

unsafe fn acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock. Read more
Source§

unsafe fn post_validate_acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock after pre_validate and lockdep validation have completed. Read more
Source§

unsafe fn reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock using existing guard state (e.g. after call_unlocked). Read more
Source§

unsafe fn post_validate_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock after pre_reacquire and lockdep validation have completed. Read more
Source§

unsafe fn untrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Temporarily untracks the held lock in lockdep (used by call_untracked). Read more
Source§

unsafe fn retrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-tracks the held lock in lockdep after untrack (used by call_untracked). Read more
Source§

unsafe fn release( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Releases the raw synchronization lock, restoring the state. Read more
Source§

impl<L: RawLock, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> LockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for IrqSavePolicy

Source§

type AcquireArgs = <IrqSavePolicy as LockPolicy<L>>::AcquireArgs

Arguments passed when acquiring the lock under this policy.
Source§

type GuardState = LockdepTrackedGuardState<<IrqSavePolicy as LockPolicy<L>>::GuardState>

State stored in the pinned guard across lock acquisition and release.
Source§

unsafe fn pre_validate( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Performs any pre-validation setup (such as disabling and saving interrupts) before lockdep validation runs. Read more
Source§

unsafe fn pre_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-runs pre-validation on an existing GuardState before re-acquiring the lock (e.g. in call_unlocked). Read more
Source§

unsafe fn acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock. Read more
Source§

unsafe fn post_validate_acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock after pre_validate and lockdep validation have completed. Read more
Source§

unsafe fn reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock using existing guard state (e.g. after call_unlocked). Read more
Source§

unsafe fn post_validate_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock after pre_reacquire and lockdep validation have completed. Read more
Source§

unsafe fn untrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Temporarily untracks the held lock in lockdep (used by call_untracked). Read more
Source§

unsafe fn retrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-tracks the held lock in lockdep after untrack (used by call_untracked). Read more
Source§

unsafe fn release( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Releases the raw synchronization lock, restoring the state. Read more
Source§

impl<L: RawLock, LP: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> LockPolicy<LockdepTracked<L, LP, LOCK_FLAGS>> for NoIrqSavePolicy

Source§

type AcquireArgs = <NoIrqSavePolicy as LockPolicy<L>>::AcquireArgs

Arguments passed when acquiring the lock under this policy.
Source§

type GuardState = LockdepTrackedGuardState<<NoIrqSavePolicy as LockPolicy<L>>::GuardState>

State stored in the pinned guard across lock acquisition and release.
Source§

unsafe fn pre_validate( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Performs any pre-validation setup (such as disabling and saving interrupts) before lockdep validation runs. Read more
Source§

unsafe fn pre_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-runs pre-validation on an existing GuardState before re-acquiring the lock (e.g. in call_unlocked). Read more
Source§

unsafe fn acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock. Read more
Source§

unsafe fn post_validate_acquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, args: Self::AcquireArgs, )

Acquires the raw synchronization lock after pre_validate and lockdep validation have completed. Read more
Source§

unsafe fn reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock using existing guard state (e.g. after call_unlocked). Read more
Source§

unsafe fn post_validate_reacquire( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-acquires the raw synchronization lock after pre_reacquire and lockdep validation have completed. Read more
Source§

unsafe fn untrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Temporarily untracks the held lock in lockdep (used by call_untracked). Read more
Source§

unsafe fn retrack( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Re-tracks the held lock in lockdep after untrack (used by call_untracked). Read more
Source§

unsafe fn release( lock: &LockdepTracked<L, LP, LOCK_FLAGS>, state: &mut Self::GuardState, )

Releases the raw synchronization lock, restoring the state. Read more
Source§

impl<L: RawLock, P: ExclusiveLockPolicy<L>, const LOCK_FLAGS: LockFlags> RawLock for LockdepTracked<L, P, LOCK_FLAGS>

Source§

type DefaultPolicy = LockdepTracked<L, P, LOCK_FLAGS>

Default policy that should be used when acquiring this lock.
Source§

unsafe fn init(class_id: *const c_void) -> impl PinInit<Self, Infallible>

Returns a PinInit block to initialize the raw lock in-place. Read more
Source§

fn as_mut_ptr(&self) -> *mut c_void

Convert the raw lock reference to a standard c_void pointer for FFI.
Source§

impl<L: RawLock + Send, P, const LOCK_FLAGS: LockFlags> Send for LockdepTracked<L, P, LOCK_FLAGS>

Source§

impl<L: RawLock + Sync, P, const LOCK_FLAGS: LockFlags> Sync for LockdepTracked<L, P, LOCK_FLAGS>

Auto Trait Implementations§

§

impl<L, P, const LOCK_FLAGS: u16> Freeze for LockdepTracked<L, P, LOCK_FLAGS>
where L: Freeze, PhantomData<P>: Freeze,

§

impl<L, P, const LOCK_FLAGS: u16> RefUnwindSafe for LockdepTracked<L, P, LOCK_FLAGS>
where L: RefUnwindSafe, PhantomData<P>: RefUnwindSafe,

§

impl<L, P, const LOCK_FLAGS: u16> UnsafeUnpin for LockdepTracked<L, P, LOCK_FLAGS>
where L: UnsafeUnpin, PhantomData<P>: UnsafeUnpin,

§

impl<L, P, const LOCK_FLAGS: u16> UnwindSafe for LockdepTracked<L, P, LOCK_FLAGS>
where L: UnwindSafe, PhantomData<P>: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Init<T> for T

Source§

unsafe fn __init(self, slot: *mut T) -> Result<(), !>

Initializes slot. Read more
Source§

fn chain<F>(self, f: F) -> ChainInit<Self, F, T, E>
where F: FnOnce(&mut T) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

Source§

impl<T> PinInit<T> for T

Source§

unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), !>

Initializes slot. Read more
Source§

fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>
where F: FnOnce(Pin<&mut T>) -> Result<(), E>,

First initializes the value using self then calls the function f with the initialized value. Read more
§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToMutPtr for T
where T: ?Sized,

Source§

type Target = T

The target type of the pointer.
Source§

fn to_mut_ptr(&self) -> *mut T

Casts the reference to a mutable raw pointer.
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.