pub struct Scheduler { /* private fields */ }
Implementations§
Source§impl Scheduler
impl Scheduler
pub const fn new() -> Self
pub fn spawn_thread( &mut self, stack: &'static mut [u8], entry_point: fn(), priority: u8, ) -> ThreadResult<ThreadId>
pub fn schedule(&mut self) -> Option<ThreadId>
pub fn get_current_thread(&self) -> Option<ThreadId>
pub fn set_current_thread(&mut self, thread_id: Option<ThreadId>)
pub fn exit_current_thread(&mut self)
pub fn join_thread( &mut self, target_id: ThreadId, current_id: ThreadId, ) -> ThreadResult<()>
pub fn get_thread(&self, thread_id: ThreadId) -> Option<&Thread>
pub fn get_thread_mut(&mut self, thread_id: ThreadId) -> Option<&mut Thread>
pub fn switch_context( &mut self, from_id: ThreadId, to_id: ThreadId, ) -> ThreadResult<()>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scheduler
impl RefUnwindSafe for Scheduler
impl !Send for Scheduler
impl !Sync for Scheduler
impl Unpin for Scheduler
impl !UnwindSafe for Scheduler
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