1570af302Sopenharmony_ci#include <sched.h> 2570af302Sopenharmony_ci#include "options.h" 3570af302Sopenharmony_ci#define T(t) (t*)0; 4570af302Sopenharmony_ci#define F(t,n) {t *y = &x.n;} 5570af302Sopenharmony_ci#define C(n) switch(n){case n:;} 6570af302Sopenharmony_cistatic void f() 7570af302Sopenharmony_ci{ 8570af302Sopenharmony_ciT(struct timespec) 9570af302Sopenharmony_ci{ 10570af302Sopenharmony_cistruct sched_param x; 11570af302Sopenharmony_ciF(int,sched_priority) 12570af302Sopenharmony_ci#if defined(POSIX_SPORADIC_SERVER) || defined(POSIX_THREAD_SPORADIC_SERVER) 13570af302Sopenharmony_ciF(int,sched_ss_low_priority) 14570af302Sopenharmony_ciF(struct timespec,sched_ss_repl_period) 15570af302Sopenharmony_ciF(struct timespec,sched_ss_init_budget) 16570af302Sopenharmony_ciF(int,sched_ss_max_repl) 17570af302Sopenharmony_ciT(time_t) 18570af302Sopenharmony_ciC(SCHED_SPORADIC) 19570af302Sopenharmony_ci#endif 20570af302Sopenharmony_ci} 21570af302Sopenharmony_ci#ifdef POSIX_PRIORITY_SCHEDULING 22570af302Sopenharmony_ciT(pid_t) 23570af302Sopenharmony_ci{int(*p)(pid_t,struct sched_param*) = sched_getparam;} 24570af302Sopenharmony_ci{int(*p)(pid_t) = sched_getscheduler;} 25570af302Sopenharmony_ci{int(*p)(pid_t,const struct sched_param*) = sched_setparam;} 26570af302Sopenharmony_ci{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;} 27570af302Sopenharmony_ci#endif 28570af302Sopenharmony_ciC(SCHED_FIFO) 29570af302Sopenharmony_ciC(SCHED_RR) 30570af302Sopenharmony_ciC(SCHED_OTHER) 31570af302Sopenharmony_ci{int(*p)(int) = sched_get_priority_max;} 32570af302Sopenharmony_ci{int(*p)(int) = sched_get_priority_min;} 33570af302Sopenharmony_ci{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;} 34570af302Sopenharmony_ci{int(*p)(void) = sched_yield;} 35570af302Sopenharmony_ci} 36