Lines Matching defs:tfd
200 static int * tfd; /* sorted entries */
443 if(tfd[i] == handle) {
444 tfd[i] = -1;
465 * Reconstruct the tfd-array. This will be an sorted array of indexes
478 tfd = _xrealloc(tfd, sizeof(int *) * tfd_alloc);
481 pp = tfd;
486 assert(pp - tfd == (ptrdiff_t)tims_used);
490 qsort(tfd, tfd_used, sizeof(int), tim_cmp);
535 i, tfd[i]->when - now);
538 if((tout = tims[tfd[0]].when - now) < 0)
626 if(tfd[i] < 0)
628 if(tims[tfd[i]].when > now)
631 fprintf(stderr, "rpoll_dispatch() -- timeout %d",tfd[i]);
632 (*tims[tfd[i]].func)(tfd[i], tims[tfd[i]].arg);
633 if(tfd[i] < 0)
635 if(tims[tfd[i]].repeat)
636 tims[tfd[i]].when = now + tims[tfd[i]].usecs;
638 tims[tfd[i]].func = NULL;
640 tfd[i] = -1;