SysCpu

Struct SysCpu 

Source
pub struct SysCpu;

Implementations§

Source§

impl SysCpu

Source

pub const OP_EXIT: u8 = 1u8

Source

pub const OP_WAIT: u8 = 2u8

Source

pub const OP_WAKE: u8 = 3u8

Source

pub const OP_KILL: u8 = 4u8

Source

pub const OP_SPAWN: u8 = 5u8

Source

pub const OP_USAGE: u8 = 6u8

Source

pub const OP_AFFINE_CPU: u8 = 7u8

Source

pub const F_HANDLE_ARRAY: u32 = 1u32

Source

pub const F_TIMEOUT: u32 = 2u32

Source

pub const F_DONTBLOCK: u32 = 4u32

Source

pub const F_SWAP_TARGET: u32 = 8u32

Source

pub const F_WAKE_TARGET: u32 = 16u32

Source

pub fn exit(code: u64) -> !

Source

pub fn kill(target: SysHandle) -> Result<(), ErrorCode>

Source

pub fn wake(target: SysHandle) -> Result<(), ErrorCode>

Source

pub fn wait( wait_handles: &mut [SysHandle], swap_target: SysHandle, wake_target: SysHandle, timeout: Option<Instant>, ) -> Result<(), ErrorCode>

Source

pub fn spawn( process: SysHandle, stack_start: u64, thread_fn: u64, thread_arg: u64, ) -> Result<SysHandle, ErrorCode>

Source

pub fn sched_yield()

Source

pub fn query_stats(buf: &mut [f32]) -> Result<(), ErrorCode>

Source

pub fn affine_to_cpu(cpu: Option<u32>) -> Result<(), ErrorCode>

Affine the current thread to the specified CPU (or remove the affinity). Only the IO_MANAGER can affine to CPU 0.

Auto Trait Implementations§

§

impl Freeze for SysCpu

§

impl RefUnwindSafe for SysCpu

§

impl Send for SysCpu

§

impl Sync for SysCpu

§

impl Unpin for SysCpu

§

impl UnwindSafe for SysCpu

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.