|
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(pid_t)
|
|
nsz |
056b01 |
T(time_t)
|
|
nsz |
056b01 |
T(struct timespec)
|
|
nsz |
056b01 |
{
|
|
nsz |
056b01 |
struct sched_param x;
|
|
nsz |
056b01 |
F(int,sched_priority)
|
|
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)
|
|
nsz |
056b01 |
}
|
|
nsz |
056b01 |
C(SCHED_FIFO)
|
|
nsz |
056b01 |
C(SCHED_RR)
|
|
nsz |
056b01 |
C(SCHED_SPORADIC)
|
|
nsz |
056b01 |
C(SCHED_OTHER)
|
|
nsz |
056b01 |
int(*p_sched_get_priority_max)(int) = sched_get_priority_max;
|
|
nsz |
056b01 |
int(*p_sched_get_priority_min)(int) = sched_get_priority_min;
|
|
nsz |
056b01 |
int(*p_sched_getparam)(pid_t,struct sched_param*) = sched_getparam;
|
|
nsz |
056b01 |
int(*p_sched_getscheduler)(pid_t) = sched_getscheduler;
|
|
nsz |
056b01 |
int(*p_sched_rr_get_interval)(pid_t,struct timespec*) = sched_rr_get_interval;
|
|
nsz |
056b01 |
int(*p_sched_setparam)(pid_t,const struct sched_param*) = sched_setparam;
|
|
nsz |
056b01 |
int(*p_sched_setscheduler)(pid_t,int,const struct sched_param*) = sched_setscheduler;
|
|
nsz |
056b01 |
int(*p_sched_yield)(void) = sched_yield;
|
|
nsz |
056b01 |
}
|