zephyr::raw

Function k_thread_stack_alloc

source
pub unsafe extern "C" fn k_thread_stack_alloc(
    size: usize,
    flags: i32,
) -> *mut z_thread_stack_element
Expand description

@brief Dynamically allocate a thread stack.

Relevant stack creation flags include:

  • @ref K_USER allocate a userspace thread (requires CONFIG_USERSPACE=y)

@param size Stack size in bytes. @param flags Stack creation flags, or 0.

@retval the allocated thread stack on success. @retval NULL on failure.

@see CONFIG_DYNAMIC_THREAD