Enum twizzler_abi::syscall::ThreadSync
source · #[repr(C)]pub enum ThreadSync {
Sleep(ThreadSyncSleep, ThreadSyncResult),
Wake(ThreadSyncWake, ThreadSyncResult),
}
Expand description
Either a sleep or wake request. The syscall comprises of a number of either sleep or wake requests.
Variants§
Sleep(ThreadSyncSleep, ThreadSyncResult)
Wake(ThreadSyncWake, ThreadSyncResult)
Implementations§
source§impl ThreadSync
impl ThreadSync
sourcepub fn new_sleep(sleep: ThreadSyncSleep) -> Self
pub fn new_sleep(sleep: ThreadSyncSleep) -> Self
Build a sleep request.
sourcepub fn new_wake(wake: ThreadSyncWake) -> Self
pub fn new_wake(wake: ThreadSyncWake) -> Self
Build a wake request.
sourcepub fn get_result(&self) -> ThreadSyncResult
pub fn get_result(&self) -> ThreadSyncResult
Get the result of the thread sync operation.
pub fn ready(&self) -> bool
Trait Implementations§
source§impl Clone for ThreadSync
impl Clone for ThreadSync
source§fn clone(&self) -> ThreadSync
fn clone(&self) -> ThreadSync
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 ThreadSync
impl Debug for ThreadSync
source§impl Ord for ThreadSync
impl Ord for ThreadSync
source§fn cmp(&self, other: &ThreadSync) -> Ordering
fn cmp(&self, other: &ThreadSync) -> 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<ThreadSync> for ThreadSync
impl PartialEq<ThreadSync> for ThreadSync
source§fn eq(&self, other: &ThreadSync) -> bool
fn eq(&self, other: &ThreadSync) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<ThreadSync> for ThreadSync
impl PartialOrd<ThreadSync> for ThreadSync
source§fn partial_cmp(&self, other: &ThreadSync) -> Option<Ordering>
fn partial_cmp(&self, other: &ThreadSync) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ThreadSync
impl Eq for ThreadSync
impl StructuralEq for ThreadSync
impl StructuralPartialEq for ThreadSync
Auto Trait Implementations§
impl !ObjSafe for ThreadSync
impl RefUnwindSafe for ThreadSync
impl Send for ThreadSync
impl !Sync for ThreadSync
impl Unpin for ThreadSync
impl UnwindSafe for ThreadSync
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