Skip to main content

create_user_thread_with_kernel_stack

Function create_user_thread_with_kernel_stack 

Source
pub fn create_user_thread_with_kernel_stack(
    entry_ctx: UserEntryContext,
    entry: u64,
    stack_size: u64,
    arg0: u64,
    tls_base: u64,
) -> Result<Arc<Task>, SyscallError>
Expand description

/thread/create variant: the kernel allocates and owns the user stack.

Same validation rules as create_user_thread except stack_size replaces stack_top. On success the child carries a kernel_stack_user mapping that is reclaimed automatically when the thread dies (making detach() free of any userspace cleanup).