Debian Codegraph @

testsuite/systemtap.syscall/getitimer.c

raw
1 /* COVERAGE: getitimer */
2
3 #include <sys/time.h>
4 #include <sys/syscall.h>
5 #include <unistd.h>
6
7 int main()
8 {
9 struct itimerval value;
10
11 getitimer(ITIMER_REAL, &value);
12 //staptest// getitimer (ITIMER_REAL, XXXX) = 0
13
14 getitimer(ITIMER_VIRTUAL, &value);
15 //staptest// getitimer (ITIMER_VIRTUAL, XXXX) = 0
16
17 getitimer(ITIMER_PROF, &value);
18 //staptest// getitimer (ITIMER_PROF, XXXX) = 0
19
20 getitimer(-1, &value);
21 //staptest// getitimer (0xffffffff, XXXX) = -NNNN (EINVAL)
22
23 syscall(__NR_getitimer, ITIMER_REAL, (struct itimerval *)-1);
24 #ifdef __s390__
25 //staptest// getitimer (ITIMER_REAL, 0x[7]?[f]+) = -NNNN (EFAULT)
26 #else
27 //staptest// getitimer (ITIMER_REAL, 0x[f]+) = -NNNN (EFAULT)
28 #endif
29
30 return 0;
31 }