⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

create_thread

Function create_thread 

Source
pub fn create_thread(
    entry_point: usize,
    stack_ptr: usize,
    arg: usize,
    tls_ptr: usize,
) -> KernelResult<ThreadId>
Expand description

Create a new thread in the current process

Allocates real stack frames for the thread via the frame allocator using [ThreadBuilder]. If stack_ptr is non-zero, it overrides the user stack pointer. If tls_ptr is non-zero, it sets the TLS base address.