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 93 #define PTHREAD_KEYS_MAX CONFIG_NPTHREAD_KEYS 115 #if defined(__cplusplus) 116 #define EXTERN extern "C" 119 #define EXTERN extern 131 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[]);
135 int task_activate(FAR
struct tcb_s *tcb);
141 #ifndef CONFIG_BUILD_KERNEL 167 int task_create(FAR
const char *name,
int priority,
int stack_size, main_t entry, FAR
char *
const argv[]);
326 #ifdef CONFIG_SCHED_INSTRUMENTATION 346 #define sched_note_start(t) 347 #define sched_note_stop(t) 348 #define sched_note_switch(t1, t2) 352 #if defined(__cplusplus)
int task_delete(pid_t pid)
causes a specified task to cease to exist.
int sched_getscheduler(pid_t pid)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sched_rr_get_interval(pid_t pid, FAR struct timespec *interval)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
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)
#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)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sched_setparam(pid_t pid, const struct sched_param *param)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sched_lockcount(void)
returns the current value of the lockcount
int sched_get_priority_min(int policy)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sched_getparam(pid_t pid, struct sched_param *param)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
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)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)
int sched_get_priority_max(int policy)
POSIX APIs (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)