pub struct ProcessBuilder { /* private fields */ }Expand description
Process builder for convenient process creation
Implementations§
Source§impl ProcessBuilder
impl ProcessBuilder
Sourcepub fn priority(self, priority: ProcessPriority) -> Self
pub fn priority(self, priority: ProcessPriority) -> Self
Set priority
Sourcepub fn build(self) -> Process
pub fn build(self) -> Process
Build the process.
Note: The VAS is created but not initialized (no page table root).
Callers that need a real address space must call
memory_space.lock().init() afterwards (as
create_process_with_options does), or clone from an existing
address space (as fork_process does).
Sourcepub fn build_with_address_space(self) -> Result<Process, KernelError>
pub fn build_with_address_space(self) -> Result<Process, KernelError>
Build the process with an initialized address space.
Allocates a root page table frame and maps kernel regions into the new address space. This is the preferred method for creating standalone processes (not forked from an existing process).