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