Debian Codegraph @

testsuite/systemtap.syscall/setpriority.c

raw
1 /* COVERAGE: setpriority */
2
3 #include <stdio.h>
4 #include <sys/time.h>
5 #include <sys/resource.h>
6
7 int main()
8 {
9 setpriority(PRIO_PROCESS, 0, 2);
10 //staptest// setpriority (PRIO_PROCESS, 0, 2) = NNNN
11
12 setpriority(-1, 0, 2);
13 //staptest// setpriority (0x[f]+, 0, 2) = -NNNN (EINVAL)
14
15 setpriority(PRIO_PGRP, -1, 2);
16 //staptest// setpriority (PRIO_PGRP, -1, 2) = -NNNN (ESRCH)
17
18 setpriority(PRIO_USER, 0, 0);
19 //staptest// setpriority (PRIO_USER, 0, 0) = NNNN
20
21 // This call might or might not fail, depending on whether we're
22 // root or not. So, ignore the return value.
23 setpriority(PRIO_PROCESS, 0, -1);
24 //staptest// setpriority (PRIO_PROCESS, 0, -1)
25 }