Lines Matching defs:LockClassKey
40 pub struct LockClassKey {
47 unsafe impl Send for LockClassKey {}
51 unsafe impl Sync for LockClassKey {}
53 impl LockClassKey {
62 /// * The destructor must never run on the returned `LockClassKey`.
64 LockClassKey {
79 /// use kernel::sync::{LockClassKey, SpinLock};
82 /// let key = KBox::pin_init(LockClassKey::new_dynamic(), GFP_KERNEL)?;
91 /// unsafe { <Pin<KBox<LockClassKey>> as ForeignOwnable>::borrow(key_ptr) }
97 /// unsafe { drop(<Pin<KBox<LockClassKey>> as ForeignOwnable>::from_foreign(key_ptr)) };
116 impl PinnedDrop for LockClassKey {
142 static CLASS: $crate::sync::LockClassKey =
143 // SAFETY: The returned `LockClassKey` is stored in static memory and we pin it. Drop
145 unsafe { $crate::sync::LockClassKey::new_static() };