Skip to main content

create_user_task

Function create_user_task 

Source
pub fn create_user_task(
    pid: ProcessId,
    name: &'static str,
    entry: usize,
    stack_top: usize,
    satp: usize,
) -> Box<ProcessControlBlock>
Expand description

Create a user-mode task PCB.

The task will start in U-mode at entry with sp set to stack_top. The user page table (satp) is set so the CPU can access user memory while kernel trap handlers remain reachable.