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) 102 #define PTHREAD_KEYS_MAX CONFIG_NPTHREAD_KEYS 125 #if defined(__cplusplus) 126 #define EXTERN extern "C" 129 #define EXTERN extern 141 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[]);
145 int task_activate(FAR
struct tcb_s *tcb);
151 #ifndef CONFIG_BUILD_KERNEL 178 int task_create(FAR
const char *name,
int priority,
int stack_size, main_t entry, FAR
char *
const argv[]);
364 #ifdef CONFIG_SCHED_INSTRUMENTATION 384 #define sched_note_start(t) 385 #define sched_note_stop(t) 386 #define sched_note_switch(t1, t2) 390 #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.
#define sched_note_switch(t1, t2)
int task_setcancelstate(int state, FAR int *oldstate)
#define sched_note_stop(t)
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
#define sched_note_start(t)
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