7 int iopause(iopause_fd *x,
unsigned int len,
struct taia *deadline,
struct taia *stamp)
21 if (d > 1000.0) d = 1000.0;
22 millisecs = d * 1000.0 + 20.0;
25 for (i = 0;i < len;++i)
30 ret = poll(x,len,millisecs);
48 for (i = 0;i < len;++i) {
51 if (fd >= 8 *
sizeof(fd_set))
continue;
53 if (fd >= nfds) nfds = fd + 1;
54 if (x[i].events & IOPAUSE_READ) FD_SET(fd,&rfds);
55 if (x[i].events & IOPAUSE_WRITE) FD_SET(fd,&wfds);
58 tv.tv_sec = millisecs / 1000;
59 tv.tv_usec = 1000 * (millisecs % 1000);
61 if ((ret=select(nfds,&rfds,&wfds,(fd_set *) 0,&tv)) <= 0)
65 for (i = 0; i < len; ++i) {
68 if (fd >= 8 *
sizeof(fd_set))
continue;
70 if (x[i].events & IOPAUSE_READ)
71 if (FD_ISSET(fd,&rfds)) x[i].revents |= IOPAUSE_READ;
72 if (x[i].events & IOPAUSE_WRITE)
73 if (FD_ISSET(fd,&wfds)) x[i].revents |= IOPAUSE_WRITE;
int iopause(iopause_fd *x, unsigned int len, struct taia *deadline, struct taia *stamp)
void taia_sub(struct taia *, const struct taia *, const struct taia *)
int taia_less(const struct taia *, const struct taia *)
double taia_approx(const struct taia *)