2 #include <asm/unistd.h>
4 #if defined __NR_sched_getparam && defined __NR_sched_setparam
13 struct sched_param *const param =
14 tail_alloc(sizeof(struct sched_param));
16 long rc = syscall(__NR_sched_getparam, 0, param);
17 printf("sched_getparam(0, [%d]) = %ld\n",
18 param->sched_priority, rc);
20 param->sched_priority = -1;
21 rc = syscall(__NR_sched_setparam, 0, param);
22 printf("sched_setparam(0, [%d]) = %ld %s (%m)\n",
23 param->sched_priority, rc, errno2name());
25 puts("+++ exited with 0 +++");
31 SKIP_MAIN_UNDEFINED("__NR_sched_getparam && __NR_sched_setparam")