uwb-core DPL (Decawave Porting Layer) thread/task wrappers More...
uwb-core DPL (Decawave Porting Layer) thread/task wrappers
Definition in file dpl_tasks.h.
Go to the source code of this file.
Data Structures | |
struct | dpl_task |
dpl task wrapper More... | |
Typedefs | |
typedef thread_task_func_t | dpl_task_func_t |
dpl task function | |
Functions | |
int | dpl_task_init (struct dpl_task *t, const char *name, dpl_task_func_t func, void *arg, uint8_t prio, dpl_time_t sanity_itvl, dpl_stack_t *stack_bottom, uint16_t stack_size) |
Initialize a task. More... | |
int | dpl_task_remove (struct dpl_task *t) |
removes specified task More... | |
uint8_t | dpl_task_count (void) |
Return the number of tasks initialized. More... | |
void | dpl_task_yield (void) |
Lets current thread yield. | |
uint8_t dpl_task_count | ( | void | ) |
Return the number of tasks initialized.
int dpl_task_init | ( | struct dpl_task * | t, |
const char * | name, | ||
dpl_task_func_t | func, | ||
void * | arg, | ||
uint8_t | prio, | ||
dpl_time_t | sanity_itvl, | ||
dpl_stack_t * | stack_bottom, | ||
uint16_t | stack_size | ||
) |
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.
[in] | t | the task to initialize |
[in] | name | task name |
[in] | func | task function to call |
[in] | arg | argument to pass in task init function |
[in] | prio | task priority |
[in] | sanity_itvl | UNUSED |
[in] | stack_bottom | pointer to bottom of the stack |
[in] | stack_size | task stack size |
int dpl_task_remove | ( | struct dpl_task * | t | ) |
removes specified task
NOTE: This interface is currently experimental and not ready for common use