61 #ifndef __INCLUDE_SCHED_H 62 #define __INCLUDE_SCHED_H 68 #include <tinyara/config.h> 70 #include <sys/types.h> 88 #define SCHED_SPORADIC 3 94 #define TASK_CANCEL_ENABLE (0) 95 #define TASK_CANCEL_DISABLE (1) 97 #define TASK_CANCEL_DEFERRED (0) 98 #define TASK_CANCEL_ASYNCHRONOUS (1) 121 #if defined(__cplusplus) 122 #define EXTERN extern "C" 125 #define EXTERN extern 137 int task_init(FAR
struct tcb_s *tcb,
const char *name,
int priority, FAR uint32_t *stack, uint32_t stack_size, main_t entry, FAR
char *
const argv[]);
141 int task_activate(FAR
struct tcb_s *tcb);
147 #ifndef CONFIG_BUILD_KERNEL 172 int task_create(FAR
const char *name,
int priority,
int stack_size, main_t entry, FAR
char *
const argv[]);
355 #if defined(__cplusplus) int task_setcanceltype(int type, FAR int *oldtype)
int task_delete(pid_t pid)
causes a specified task to cease to exist.
int sched_getscheduler(pid_t pid)
get scheduling policy and parameters
int sched_rr_get_interval(pid_t pid, FAR struct timespec *interval)
get execution time limits
int task_restart(pid_t pid)
restart a task.
int task_create(FAR const char *name, int priority, int stack_size, main_t entry, FAR char *const argv[])
creates and activates a new task with a specified priority and returns its system-assigned ID...
POSIX-like scheduling parameter structure.
int task_setcancelstate(int state, FAR int *oldstate)
This is the common part of the task control block (TCB). The TCB is the heart of the TinyAra task-con...
int sched_lock(void)
disable context switching
int sched_yield(void)
yield the processor
int sched_setparam(pid_t pid, const struct sched_param *param)
set scheduling parameters
int sched_lockcount(void)
returns the current value of the lockcount
void task_testcancel(void)
int sched_get_priority_min(int policy)
get priority limits
int sched_getparam(pid_t pid, struct sched_param *param)
get scheduling parameters
structure represents an elapsed time
int sched_unlock(void)
re-enable the context switching which blocked from sched_lock()
int sched_setscheduler(pid_t pid, int policy, FAR const struct sched_param *param)
set scheduling policy and parameters
int sched_get_priority_max(int policy)
get priority limits