Lines Matching refs:tfd
189 static int * tfd; /* sorted entries */ variable
432 if(tfd[i] == handle) { in poll_stop_timer()
433 tfd[i] = -1; in poll_stop_timer()
467 tfd = _xrealloc(tfd, sizeof(int *) * tfd_alloc); in sort_timers()
470 pp = tfd; in sort_timers()
475 assert(pp - tfd == (ptrdiff_t)tims_used); in sort_timers()
479 qsort(tfd, tfd_used, sizeof(int), tim_cmp); in sort_timers()
524 i, tfd[i]->when - now); in poll_dispatch()
527 if((tout = tims[tfd[0]].when - now) < 0) in poll_dispatch()
615 if(tfd[i] < 0) in poll_dispatch()
617 if(tims[tfd[i]].when > now) in poll_dispatch()
620 fprintf(stderr, "rpoll_dispatch() -- timeout %d",tfd[i]); in poll_dispatch()
621 (*tims[tfd[i]].func)(tfd[i], tims[tfd[i]].arg); in poll_dispatch()
622 if(tfd[i] < 0) in poll_dispatch()
624 if(tims[tfd[i]].repeat) in poll_dispatch()
625 tims[tfd[i]].when = now + tims[tfd[i]].usecs; in poll_dispatch()
627 tims[tfd[i]].func = NULL; in poll_dispatch()
629 tfd[i] = -1; in poll_dispatch()