Home | History | Annotate | Download | only in linux

Lines Matching defs:tfd

146 long waittmr(int tfd, int timeo)
151 pfd.fd = tfd;
164 if (read(tfd, &ticks, sizeof(ticks)) != sizeof(ticks))
175 int i, tfd;
198 if ((tfd = timerfd_create(clks[i].id, 0)) == -1)
204 if (timerfd_settime(tfd, 0, &tmr, NULL))
211 ticks = waittmr(tfd, -1);
224 if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
231 ticks = waittmr(tfd, -1);
243 if (timerfd_settime(tfd, TFD_TIMER_ABSTIME, &tmr, NULL))
251 if (timerfd_gettime(tfd, &tmr))
264 ticks = waittmr(tfd, -1);
282 if (timerfd_settime(tfd, 0, &tmr, NULL))
288 fprintf(stderr, "timerfd = %d\n", tfd);
292 ticks = waittmr(tfd, -1);
300 fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) | O_NONBLOCK);
302 if (read(tfd, &uticks, sizeof(uticks)) > 0)
310 fcntl(tfd, F_SETFL, fcntl(tfd, F_GETFL, 0) & ~O_NONBLOCK);
312 close(tfd);