Skip to main content

create_kernel_task

Function create_kernel_task 

Source
pub unsafe fn create_kernel_task(
    pid: ProcessId,
    name: &'static str,
    entry: extern "C" fn() -> !,
    stack: *mut [u8; 4096],
) -> Box<ProcessControlBlock>
Expand description

Create a kernel task PCB backed by the supplied stack.

ยงSafety

stack must be a valid, uniquely owned 4 KiB task stack that remains alive and unmoved for as long as the returned PCB can be scheduled.