blob: 506ad641f9bceffb460361290c736a9813dc2123 [file] [log] [blame]
//! Implements `Syscalls` for all types that implement `RawSyscalls`.
use crate::{return_variant, RawSyscalls, Syscalls, YieldType};
impl<S: RawSyscalls> Syscalls for S {
// -------------------------------------------------------------------------
// Yield
// -------------------------------------------------------------------------
fn yield_wait() {
Self::raw_yield(YieldType::Wait);
}
fn yield_no_wait() -> bool {
Self::raw_yield(YieldType::NoWait) != return_variant::FAILURE.into()
}
}