2 #include <asm/unistd.h>
4 #ifdef __NR_sched_rr_get_interval
14 struct timespec *const tp = tail_alloc(sizeof(struct timespec));
17 rc = syscall(__NR_sched_rr_get_interval, 0, NULL);
18 printf("sched_rr_get_interval(0, NULL) = %s\n", sprintrc(rc));
20 rc = syscall(__NR_sched_rr_get_interval, 0, tp + 1);
21 printf("sched_rr_get_interval(0, %p) = %s\n", tp + 1, sprintrc(rc));
23 rc = syscall(__NR_sched_rr_get_interval, -1, tp);
24 printf("sched_rr_get_interval(-1, %p) = %s\n", tp, sprintrc(rc));
26 rc = syscall(__NR_sched_rr_get_interval, 0, tp);
28 printf("sched_rr_get_interval(0, {tv_sec=%jd, tv_nsec=%jd}) = "
29 "0\n", (intmax_t)tp->tv_sec, (intmax_t)tp->tv_nsec);
31 printf("sched_rr_get_interval(-1, %p) = %s\n", tp,
34 puts("+++ exited with 0 +++");
40 SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval")