testsuite/systemtap.syscall/getpriority.c
raw| 1 | /* COVERAGE: getpriority */ |
| 2 | |
| 3 | #include <stdio.h> |
| 4 | #include <sys/time.h> |
| 5 | #include <sys/resource.h> |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | getpriority(PRIO_PROCESS, 0); |
| 10 | //staptest// getpriority (PRIO_PROCESS, 0) = NNNN |
| 11 | |
| 12 | getpriority(PRIO_PGRP, -1); |
| 13 | //staptest// getpriority (PRIO_PGRP, -1) = -NNNN (ESRCH) |
| 14 | |
| 15 | getpriority(-1, 0); |
| 16 | //staptest// getpriority (0x[f]+, 0) = -NNNN (EINVAL) |
| 17 | |
| 18 | getpriority(PRIO_USER, 0); |
| 19 | //staptest// getpriority (PRIO_USER, 0) = NNNN |
| 20 | } |