pub struct Processor {
current: Option<Arc<TaskControlBlock>>,
idle_task_cx: TaskContext,
}
Expand description
Processor management structure
Fields§
§current: Option<Arc<TaskControlBlock>>
The task currently executing on the current processor
idle_task_cx: TaskContext
The basic control flow of each core, helping to select and switch process
Implementations§
source§impl Processor
impl Processor
sourcefn get_idle_task_cx_ptr(&mut self) -> *mut TaskContext
fn get_idle_task_cx_ptr(&mut self) -> *mut TaskContext
Get mutable reference to idle_task_cx
sourcepub fn take_current(&mut self) -> Option<Arc<TaskControlBlock>>
pub fn take_current(&mut self) -> Option<Arc<TaskControlBlock>>
Get current task in moving semanteme
sourcepub fn current(&self) -> Option<Arc<TaskControlBlock>>
pub fn current(&self) -> Option<Arc<TaskControlBlock>>
Get current task in cloning semanteme
Auto Trait Implementations§
impl !RefUnwindSafe for Processor
impl Send for Processor
impl Sync for Processor
impl Unpin for Processor
impl !UnwindSafe for Processor
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