new test system
[libc-test] / src / api / sched.c
1 #include <sched.h>
2 #define T(t) (t*)0;
3 #define F(t,n) {t *y = &x.n;}
4 #define C(n) switch(n){case n:;}
5 static void f()
6 {
7 T(struct timespec)
8 {
9 struct sched_param x;
10 F(int,sched_priority)
11 #ifdef X_SS
12 F(int,sched_ss_low_priority)
13 F(struct timespec,sched_ss_repl_period)
14 F(struct timespec,sched_ss_init_budget)
15 F(int,sched_ss_max_repl)
16 T(time_t)
17 C(SCHED_SPORADIC)
18 #endif
19 }
20 #ifdef X_PS
21 T(pid_t)
22 C(SCHED_FIFO)
23 C(SCHED_RR)
24 C(SCHED_OTHER)
25 {int(*p)(pid_t,struct sched_param*) = sched_getparam;}
26 {int(*p)(pid_t) = sched_getscheduler;}
27 {int(*p)(int) = sched_get_priority_max;}
28 {int(*p)(int) = sched_get_priority_min;}
29 {int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;}
30 {int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
31 {int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
32 #endif
33 {int(*p)(void) = sched_yield;}
34 }