Linux 5.7.7
[linux/fpc-iii.git] / tools / build / feature / test-timerfd.c
blob9c72c697a9df1833b46f724a72576e05b7ea5b63
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * test for timerfd functions used by perf-kvm-stat-live
4 */
5 #include <sys/timerfd.h>
7 int main(void)
9 struct itimerspec new_value;
11 int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
12 if (fd < 0)
13 return 1;
15 if (timerfd_settime(fd, 0, &new_value, NULL) != 0)
16 return 1;
18 return 0;