Lines Matching refs:tfd
107 long waittmr(int tfd, int timeo) in waittmr() argument
112 pfd.fd = tfd; in waittmr()
123 if (read(tfd, &ticks, sizeof(ticks)) != sizeof(ticks)) { in waittmr()
135 int tfd; in main() local
164 if ((tfd = timerfd_create(clks[i].id, 0)) == -1) { in main()
168 fprintf(stdout, "timerfd = %d\n", tfd); in main()
170 if (timerfd_settime(tfd, 0, &tmr, NULL)) { in main()
176 ticks = waittmr(tfd, -1); in main()
188 if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL)) { in main()
194 ticks = waittmr(tfd, -1); in main()
206 if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL)) { in main()
213 if (timerfd_gettime(tfd, &tmr)) { in main()
226 ticks = waittmr(tfd, -1); in main()
238 if (timerfd_settime(tfd, 0, &tmr, NULL)) { in main()
242 fprintf(stdout, "timerfd = %d\n", tfd); in main()
245 ticks = waittmr(tfd, -1); in main()
253 fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) | O_NONBLOCK); in main()
255 if (read(tfd, &uticks, sizeof(uticks)) > 0) in main()
265 fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) & ~O_NONBLOCK); in main()
267 close(tfd); in main()