Fei Jie | cd61c9f | 2016-04-25 16:18:20 +0800 | [diff] [blame] | 1 | #include "tests.h" |
| 2 | #include <sys/syscall.h> |
| 3 | |
| 4 | #ifdef __NR_sched_rr_get_interval |
| 5 | |
| 6 | # include <stdio.h> |
| 7 | # include <sched.h> |
| 8 | # include <unistd.h> |
| 9 | |
| 10 | int |
| 11 | main(void) |
| 12 | { |
| 13 | struct timespec *const tp = tail_alloc(sizeof(struct timespec)); |
| 14 | long rc = syscall(__NR_sched_rr_get_interval, -1, tp); |
| 15 | printf("sched_rr_get_interval(-1, %p) = %ld %s (%m)\n", |
| 16 | tp, rc, errno2name()); |
| 17 | |
| 18 | puts("+++ exited with 0 +++"); |
| 19 | return 0; |
| 20 | } |
| 21 | |
| 22 | #else |
| 23 | |
| 24 | SKIP_MAIN_UNDEFINED("__NR_sched_rr_get_interval") |
| 25 | |
| 26 | #endif |