pub struct RawBrwLockPi { /* private fields */ }Expand description
Opaque layout block matching the Zircon C++ BrwLockPi exactly.
Implementations§
Source§impl RawBrwLockPi
impl RawBrwLockPi
Source§impl RawBrwLockPi
impl RawBrwLockPi
Sourcepub unsafe fn init(class_id: *const c_void) -> impl PinInit<Self, Infallible>
pub unsafe fn init(class_id: *const c_void) -> impl PinInit<Self, Infallible>
Initializes a new RawBrwLockPi in-place.
§Safety
The caller must ensure that class_id is either null or points to a valid,
static LockClassId that remains valid for the lifetime of the lock.
Sourcepub fn as_mut_ptr(&self) -> *mut c_void
pub fn as_mut_ptr(&self) -> *mut c_void
Returns a raw pointer to the underlying storage.
Sourcepub unsafe fn acquire_read(&self, entry: *mut c_void)
pub unsafe fn acquire_read(&self, entry: *mut c_void)
Acquires the lock in shared (read) mode.
§Safety
The caller must ensure that the lock is pinned and initialized. If lock_dep is enabled,
entry must point to valid storage for a lockdep entry.
Sourcepub unsafe fn release_read(&self, entry: *mut c_void)
pub unsafe fn release_read(&self, entry: *mut c_void)
Releases the lock from shared (read) mode.
§Safety
The caller must currently hold the read lock on this instance. If lock_dep is enabled,
entry must point to the same valid storage used during acquisition.
Sourcepub unsafe fn acquire_write(&self, entry: *mut c_void)
pub unsafe fn acquire_write(&self, entry: *mut c_void)
Acquires the lock in exclusive (write) mode.
§Safety
The caller must ensure that the lock is pinned and initialized. If lock_dep is enabled,
entry must point to valid storage for a lockdep entry.
Sourcepub unsafe fn release_write(&self, entry: *mut c_void)
pub unsafe fn release_write(&self, entry: *mut c_void)
Releases the lock from exclusive (write) mode.
§Safety
The caller must currently hold the write lock on this instance. If lock_dep is enabled,
entry must point to the same valid storage used during acquisition.
Trait Implementations§
Source§impl Drop for RawBrwLockPi
impl Drop for RawBrwLockPi
Source§impl HasPinData for RawBrwLockPi
impl HasPinData for RawBrwLockPi
Source§impl PinnedDrop for RawBrwLockPi
impl PinnedDrop for RawBrwLockPi
impl Send for RawBrwLockPi
impl Sync for RawBrwLockPi
Auto Trait Implementations§
impl !Freeze for RawBrwLockPi
impl !RefUnwindSafe for RawBrwLockPi
impl UnsafeUnpin for RawBrwLockPi
impl UnwindSafe for RawBrwLockPi
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> PinInit<T> for T
impl<T> PinInit<T> for T
Source§unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), Infallible>
slot. Read moreSource§fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
fn pin_chain<F>(self, f: F) -> ChainPinInit<Self, F, T, E>where
F: FnOnce(Pin<&mut T>) -> Result<(), E>,
self then calls the function f with the initialized
value. Read more