regression test for brk failing in malloc
[libc-test] / src / api / sched.c
1 #include <sched.h>
2 #include "options.h"
3 #define T(t) (t*)0;
4 #define F(t,n) {t *y = &x.n;}
5 #define C(n) switch(n){case n:;}
6 static void f()
7 {
8 T(struct timespec)
9 {
10 struct sched_param x;
11 F(int,sched_priority)
12 #if defined(POSIX_SPORADIC_SERVER) || defined(POSIX_THREAD_SPORADIC_SERVER)
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 T(time_t)
18 C(SCHED_SPORADIC)
19 #endif
20 }
21 #ifdef POSIX_PRIORITY_SCHEDULING
22 T(pid_t)
23 {int(*p)(pid_t,struct sched_param*) = sched_getparam;}
24 {int(*p)(pid_t) = sched_getscheduler;}
25 {int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
26 {int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
27 #endif
28 C(SCHED_FIFO)
29 C(SCHED_RR)
30 C(SCHED_OTHER)
31 {int(*p)(int) = sched_get_priority_max;}
32 {int(*p)(int) = sched_get_priority_min;}
33 {int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;}
34 {int(*p)(void) = sched_yield;}
35 }