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
sourceimpl Processor
impl Processor
pub fn new() -> Self
fn get_idle_task_cx_ptr(&mut self) -> *mut TaskContext
pub fn take_current(&mut self) -> Option<Arc<TaskControlBlock>>
pub fn current(&self) -> Option<Arc<TaskControlBlock>>
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more