Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
dpl_tasks.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2020 Inria
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#include "os/os_task.h"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
struct
dpl_task
{
29
struct
os_task
t
;
30
};
31
35
typedef
os_task_func_t
dpl_task_func_t
;
36
56
static
inline
int
dpl_task_init
(
struct
dpl_task
*t,
const
char
*name,
dpl_task_func_t
func,
57
void
*arg, uint8_t prio,
dpl_time_t
sanity_itvl,
58
dpl_stack_t
*stack_bottom, uint16_t stack_size)
59
{
60
return
os_task_init(&t->
t
, name, func, arg, prio, sanity_itvl, stack_bottom, stack_size);
61
}
62
67
static
inline
int
dpl_task_remove
(
struct
dpl_task
*t)
68
{
69
return
os_task_remove(&t->
t
);
70
}
71
77
static
inline
uint8_t
dpl_task_count
(
void
)
78
{
79
return
os_task_count();
80
}
81
85
static
inline
void
dpl_task_yield
(
void
)
86
{
87
return
os_task_yield();
88
}
89
90
#ifdef __cplusplus
91
}
92
#endif
dpl_task_yield
static void dpl_task_yield(void)
Lets current thread yield.
Definition
dpl_tasks.h:85
dpl_task_init
static 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.
Definition
dpl_tasks.h:56
dpl_task_remove
static int dpl_task_remove(struct dpl_task *t)
removes specified task
Definition
dpl_tasks.h:67
dpl_task_func_t
os_task_func_t dpl_task_func_t
dpl task function
Definition
dpl_tasks.h:35
dpl_task_count
static uint8_t dpl_task_count(void)
Return the number of tasks initialized.
Definition
dpl_tasks.h:77
dpl_time_t
os_time_t dpl_time_t
dpl time type
Definition
dpl_types.h:53
dpl_stack_t
os_stack_t dpl_stack_t
dpl stack buffer type
Definition
dpl_types.h:58
dpl_task
dpl task wrapper
Definition
dpl_tasks.h:28
dpl_task::t
struct os_task t
os task
Definition
dpl_tasks.h:29
Generated on Sat Oct 3 2026 14:10:59 by
1.13.2