0a130aeef86f6a2fd2a9bd330640466697d6e783
[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(pid_t)
8 T(time_t)
9 T(struct timespec)
10 {
11 struct sched_param x;
12 F(int,sched_priority)
13 F(int,sched_ss_low_priority)
14 F(struct timespec,sched_ss_repl_period)
15 F(struct timespec,sched_ss_init_budget)
16 F(int,sched_ss_max_repl)
17 }
18 C(SCHED_FIFO)
19 C(SCHED_RR)
20 C(SCHED_SPORADIC)
21 C(SCHED_OTHER)
22 int(*p_sched_get_priority_max)(int) = sched_get_priority_max;
23 int(*p_sched_get_priority_min)(int) = sched_get_priority_min;
24 int(*p_sched_getparam)(pid_t,struct sched_param*) = sched_getparam;
25 int(*p_sched_getscheduler)(pid_t) = sched_getscheduler;
26 int(*p_sched_rr_get_interval)(pid_t,struct timespec*) = sched_rr_get_interval;
27 int(*p_sched_setparam)(pid_t,const struct sched_param*) = sched_setparam;
28 int(*p_sched_setscheduler)(pid_t,int,const struct sched_param*) = sched_setscheduler;
29 int(*p_sched_yield)(void) = sched_yield;
30 }