#[repr(C)]pub struct ThreadSyncSleep {
pub reference: ThreadSyncReference,
pub value: u64,
pub op: ThreadSyncOp,
pub flags: ThreadSyncFlags,
}
Expand description
Specification for a thread sleep request.
Fields§
§reference: ThreadSyncReference
Reference to an atomic u64 that we will compare to.
value: u64
The value used for the comparison.
op: ThreadSyncOp
The operation to compare *reference and value to.
flags: ThreadSyncFlags
Flags to apply to this sleep request.
Implementations§
source§impl ThreadSyncSleep
impl ThreadSyncSleep
sourcepub fn new(
reference: ThreadSyncReference,
value: u64,
op: ThreadSyncOp,
flags: ThreadSyncFlags,
) -> Self
pub fn new( reference: ThreadSyncReference, value: u64, op: ThreadSyncOp, flags: ThreadSyncFlags, ) -> Self
Construct a new thread sync sleep request. The kernel will compare the 64-bit data at
*reference
with the passed value
using op
(and optionally inverting the result). If
true, the kernel will put the thread to sleep until another thread comes along and performs
a wake request on that same word of memory.
References always refer to a particular 64-bit value inside of an object. If a virtual address is passed as a reference, it is first converted to an object-offset pair based on the current object mapping of the address space.
pub fn ready(&self) -> bool
Trait Implementations§
source§impl Clone for ThreadSyncSleep
impl Clone for ThreadSyncSleep
source§fn clone(&self) -> ThreadSyncSleep
fn clone(&self) -> ThreadSyncSleep
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ThreadSyncSleep
impl Debug for ThreadSyncSleep
source§impl Hash for ThreadSyncSleep
impl Hash for ThreadSyncSleep
source§impl Ord for ThreadSyncSleep
impl Ord for ThreadSyncSleep
source§fn cmp(&self, other: &ThreadSyncSleep) -> Ordering
fn cmp(&self, other: &ThreadSyncSleep) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ThreadSyncSleep
impl PartialEq for ThreadSyncSleep
source§impl PartialOrd for ThreadSyncSleep
impl PartialOrd for ThreadSyncSleep
impl Copy for ThreadSyncSleep
impl Eq for ThreadSyncSleep
impl StructuralPartialEq for ThreadSyncSleep
Auto Trait Implementations§
impl Freeze for ThreadSyncSleep
impl !ObjSafe for ThreadSyncSleep
impl RefUnwindSafe for ThreadSyncSleep
impl Send for ThreadSyncSleep
impl !Sync for ThreadSyncSleep
impl Unpin for ThreadSyncSleep
impl UnwindSafe for ThreadSyncSleep
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.