Struct os::task::TaskControlBlock
source · [−]pub struct TaskControlBlock {
pub task_status: TaskStatus,
pub task_cx: TaskContext,
pub memory_set: MemorySet,
pub trap_cx_ppn: PhysPageNum,
pub base_size: usize,
}Expand description
task control block structure
Fields
task_status: TaskStatustask_cx: TaskContextmemory_set: MemorySettrap_cx_ppn: PhysPageNumbase_size: usizeImplementations
sourceimpl TaskControlBlock
impl TaskControlBlock
pub fn get_trap_cx(&self) -> &'static mut TrapContext
pub fn get_user_token(&self) -> usize
pub fn new(elf_data: &[u8], app_id: usize) -> Self
Auto Trait Implementations
impl RefUnwindSafe for TaskControlBlock
impl Send for TaskControlBlock
impl Sync for TaskControlBlock
impl Unpin for TaskControlBlock
impl UnwindSafe for TaskControlBlock
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