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: KernelStack
Kernel stack corresponding to PID
inner: UPSafeCell<TaskControlBlockInner>
mutable
Implementations
sourceimpl 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 !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 · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more