pub struct TaskUserRes {
    pub tid: usize,
    pub ustack_base: usize,
    pub process: Weak<ProcessControlBlock>,
}
Expand description

User Resource for a task

Fields

tid: usize

task id

ustack_base: usize

user stack base

process: Weak<ProcessControlBlock>

process belongs to

Implementations

Create a new TaskUserRes (Task User Resource)

Allocate user resource for a task

Deallocate user resource for a task

alloc task id

dealloc task id

The bottom usr vaddr (low addr) of the trap context for a task with tid

The physical page number(ppn) of the trap context for a task with tid

the bottom addr (low addr) of the user stack for a task

the top addr (high addr) of the user stack for a task

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.