Skip to main content

nros_platform_task_init

Function nros_platform_task_init 

Source
pub unsafe extern "C" fn nros_platform_task_init(
    task: *mut c_void,
    attr: *mut c_void,
    entry: Option<unsafe extern "C" fn(arg1: *mut c_void) -> *mut c_void>,
    arg: *mut c_void,
) -> i8
Expand description

Spawn a new task. task is opaque caller-provided storage (size from nros_platform_task_storage_size); attr is a nros_platform_task_attr_t *, or NULL for every default; entry is the task entry point; arg is forwarded to entry.

Returns NROS_PLATFORM_RET_OK, or INVALID (a NULL where storage or an entry is required), NOMEM (resources exhausted now — retry may succeed) or UNSUPPORTED (this port has no tasks at all).