Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * test for timerfd functions used by perf-kvm-stat-live
0004  */
0005 #include <sys/timerfd.h>
0006 
0007 int main(void)
0008 {
0009     struct itimerspec new_value;
0010 
0011     int fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
0012     if (fd < 0)
0013         return 1;
0014 
0015     if (timerfd_settime(fd, 0, &new_value, NULL) != 0)
0016         return 1;
0017 
0018     return 0;
0019 }