pub struct DmaSlot { /* private fields */ }Expand description
Per-transfer slot — wakes the caller and stores the completion result.
UnsafeCell rather than Mutex because we use atomics for the
state field, and AtomicWaker is itself interior-mut-safe.
Implementations§
Source§impl DmaSlot
impl DmaSlot
Sourcepub const PENDING: i32 = i32::MIN
pub const PENDING: i32 = i32::MIN
Sentinel marking a transfer still in flight. i32::MIN is well
outside the negative-OVE-error range (which is -1 to -20-ish).
pub const fn new() -> Self
pub fn reset(&self)
pub fn result_store(&self, value: i32)
pub fn result_load(&self) -> i32
pub fn register(&self, w: &Waker)
pub fn wake(&self)
Auto Trait Implementations§
impl !Freeze for DmaSlot
impl !RefUnwindSafe for DmaSlot
impl Send for DmaSlot
impl Sync for DmaSlot
impl Unpin for DmaSlot
impl UnsafeUnpin for DmaSlot
impl UnwindSafe for DmaSlot
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