Blame src/api/sched.c

nsz 056b01
#include <sched.h>
Szabolcs Nagy 87b251
#include "options.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 87b251
#if defined(POSIX_SPORADIC_SERVER) || defined(POSIX_THREAD_SPORADIC_SERVER)
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 87b251
#ifdef POSIX_PRIORITY_SCHEDULING
Szabolcs Nagy de7f58
T(pid_t)
Szabolcs Nagy 87b251
{int(*p)(pid_t,struct sched_param*) = sched_getparam;}
Szabolcs Nagy 87b251
{int(*p)(pid_t) = sched_getscheduler;}
Szabolcs Nagy 87b251
{int(*p)(pid_t,const struct sched_param*) = sched_setparam;}
Szabolcs Nagy 87b251
{int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;}
Szabolcs Nagy 87b251
#endif
nsz 056b01
C(SCHED_FIFO)
nsz 056b01
C(SCHED_RR)
nsz 056b01
C(SCHED_OTHER)
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;}
Szabolcs Nagy de7f58
{int(*p)(void) = sched_yield;}
nsz 056b01
}