Struct os::task::TaskControlBlock
source · pub struct TaskControlBlock {
pub process: Weak<ProcessControlBlock>,
pub kstack: KernelStack,
inner: UPSafeCell<TaskControlBlockInner>,
}Expand description
Task control block structure
Fields§
§process: Weak<ProcessControlBlock>immutable
kstack: KernelStackKernel stack corresponding to PID
inner: UPSafeCell<TaskControlBlockInner>mutable
Implementations§
source§impl TaskControlBlock
impl TaskControlBlock
sourcepub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner>
pub fn inner_exclusive_access(&self) -> RefMut<'_, TaskControlBlockInner>
Get the mutable reference of the inner TCB
sourcepub fn get_user_token(&self) -> usize
pub fn get_user_token(&self) -> usize
Get the address of app’s page table
Auto Trait Implementations§
impl !Freeze for TaskControlBlock
impl !RefUnwindSafe for TaskControlBlock
impl Send for TaskControlBlock
impl Sync for TaskControlBlock
impl Unpin for TaskControlBlock
impl !UnwindSafe for TaskControlBlock
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