[−][src]Function mynewt::kernel::os::task_init
pub fn task_init(
arg1: Out<os_task>,
arg2: &Strn,
arg3: os_task_func_t,
arg4: Ptr,
arg5: u8,
arg6: os_time_t,
arg7: Out<[os_stack_t]>,
arg8: u16
) -> MynewtResult<()>
Initialize a task.
This function initializes the task structure pointed to by t, clearing and setting it's stack pointer, provides sane defaults and sets the task as ready to run, and inserts it into the operating system scheduler.
t
: The task to initializename
: The name of the task to initializefunc
: The task function to callarg
: The argument to pass to this task functionprio
: The priority at which to run this tasksanity_itvl
: The time at which this task should check in with the sanity task. OS_WAIT_FOREVER means never check in here.stack_bottom
: A pointer to the bottom of a task's stackstack_size
: The overall size of the task's stack.
Return: 0 on success, non-zero on failure.