X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fapi%2Fsched.c;h=23ce364030f04f9288ae9d4e623bc2d6c7a72557;hb=c886bb85233e642ca37731de72ad3e1f2f18a2f3;hp=ef5fb149a54c6a1625b4bff9e37127a25bd8c4d3;hpb=0ef2646848cbc2e6c59f8757165b5790b0132281;p=libc-test diff --git a/src/api/sched.c b/src/api/sched.c index ef5fb14..23ce364 100644 --- a/src/api/sched.c +++ b/src/api/sched.c @@ -4,7 +4,9 @@ #define C(n) switch(n){case n:;} static void f() { +#ifdef X_PS T(pid_t) +#endif T(time_t) T(struct timespec) { @@ -15,16 +17,23 @@ F(struct timespec,sched_ss_repl_period) F(struct timespec,sched_ss_init_budget) F(int,sched_ss_max_repl) } + +C(SCHED_SPORADIC) +{int(*p)(void) = sched_yield;} + +#if defined(X_PS) || defined(X_TPS) C(SCHED_FIFO) C(SCHED_RR) -C(SCHED_SPORADIC) C(SCHED_OTHER) {int(*p)(int) = sched_get_priority_max;} {int(*p)(int) = sched_get_priority_min;} +{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;} +#endif + +#ifdef X_PS {int(*p)(pid_t,struct sched_param*) = sched_getparam;} {int(*p)(pid_t) = sched_getscheduler;} -{int(*p)(pid_t,struct timespec*) = sched_rr_get_interval;} {int(*p)(pid_t,const struct sched_param*) = sched_setparam;} {int(*p)(pid_t,int,const struct sched_param*) = sched_setscheduler;} -{int(*p)(void) = sched_yield;} +#endif }