Function hermit_abi::spawn2

source ·
pub unsafe extern "C" fn spawn2(
    func: extern "C" fn(_: usize),
    arg: usize,
    prio: u8,
    stack_size: usize,
    core_id: isize
) -> Tid
Expand description

spawn a new thread with user-specified stack size

spawn2() starts a new thread. The new thread starts execution by invoking func(usize); arg is passed as the argument to func. prio defines the priority of the new thread, which can be between LOW_PRIO and HIGH_PRIO. core_id defines the core, where the thread is located. A negative value give the operating system the possibility to select the core by its own. In contrast to spawn(), spawn2() is able to define the stack size.