19 #ifndef _XENO_POSIX_SCHED_H
20 #define _XENO_POSIX_SCHED_H
22 #if defined(__KERNEL__) || defined(__XENO_SIM__)
24 #include <nucleus/xenomai.h>
27 #include <linux/sched.h>
31 #include <posix_overrides.h>
58 #pragma GCC system_header
60 #include_next <sched.h>
62 int __real_sched_yield(
void);
66 #ifndef __sched_extensions_defined
67 #define __sched_extensions_defined
69 #ifndef SCHED_SPORADIC
70 #define SCHED_SPORADIC 10
71 #define sched_ss_low_priority sched_u.ss.__sched_low_priority
72 #define sched_ss_repl_period sched_u.ss.__sched_repl_period
73 #define sched_ss_init_budget sched_u.ss.__sched_init_budget
74 #define sched_ss_max_repl sched_u.ss.__sched_max_repl
77 struct __sched_ss_param {
78 int __sched_low_priority;
79 struct timespec __sched_repl_period;
80 struct timespec __sched_init_budget;
86 #define sched_tp_partition sched_u.tp.__sched_partition
89 struct __sched_tp_param {
90 int __sched_partition;
93 struct sched_param_ex {
96 struct __sched_ss_param ss;
97 struct __sched_tp_param tp;
101 struct sched_tp_window {
102 struct timespec offset;
103 struct timespec duration;
107 struct __sched_config_tp {
109 struct sched_tp_window windows[];
113 struct __sched_config_tp tp;
116 #define sched_tp_confsz(nr_win) \
117 (sizeof(struct __sched_config_tp) + nr_win * sizeof(struct sched_tp_window))
124 union sched_config *config,
size_t len);
int sched_rr_get_interval(int pid, struct timespec *interval)
Get the round-robin scheduling time slice.
Definition: sched.c:159
int sched_get_priority_min(int policy)
Get minimum priority of the specified scheduling policy.
Definition: sched.c:81
int sched_get_priority_max(int policy)
Get maximum priority of the specified scheduling policy.
Definition: sched.c:117
int sched_setconfig_np(int cpu, int policy, union sched_config *config, size_t len)
Load CPU-specific scheduler settings for a given policy.
Definition: sched.c:636
int sched_yield(void)
Yield the processor.
Definition: sched.c:512