Blame src/api/sched.c

nsz 056b01
#include <sched.h>
nsz 056b01
#define T(t) (t*)0;
nsz 056b01
#define F(t,n) {t *y = &x.;;}
nsz 056b01
#define C(n) switch(n){case n:;}
nsz 056b01
static void f()
nsz 056b01
{
nsz 056b01
T(struct timespec)
nsz 056b01
{
nsz 056b01
struct sched_param x;
nsz 056b01
F(int,sched_priority)
Szabolcs Nagy de7f58
#ifdef X_SS
nsz 056b01
F(int,sched_ss_low_priority)
nsz 056b01
F(struct timespec,sched_ss_repl_period)
nsz 056b01
F(struct timespec,sched_ss_init_budget)
nsz 056b01
F(int,sched_ss_max_repl)
Szabolcs Nagy de7f58
T(time_t)
nsz 3c60f4
C(SCHED_SPORADIC)
Szabolcs Nagy de7f58
#endif
Szabolcs Nagy de7f58
}
Szabolcs Nagy de7f58
#ifdef X_PS
Szabolcs Nagy de7f58
T(pid_t)
nsz 056b01
C(SCHED_FIFO)
nsz 056b01
C(SCHED_RR)
nsz 056b01
C(SCHED_OTHER)
Szabolcs Nagy de7f58
{int(*p)(pid_t,struct sched_param*) = sched_getparam;}
Szabolcs Nagy de7f58
{int(*p)(pid_t) = sched_getscheduler;}
nsz 0ef264
{int(*p)(int) = sched_get_priority_max;}
nsz 0ef264
{int(*p)(int) = sched_get_priority_min;}
nsz 3c60f4
{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;}
nsz 0ef264
{int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
nsz 0ef264
{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
nsz 3c60f4
#endif
Szabolcs Nagy de7f58
{int(*p)(void) = sched_yield;}
nsz 056b01
}