rwait
if (rwait(&tv) && read(0, &c, 1) != 1)
if (!rwait(&timeleft))
int rwait(struct timeval *);
} while (rwait(NULL) == -1);
fio->rwait++;
fio->rwait--;
if (fio->rwait == 0 && (fio->stat & FIO_ENABLE_R) == 0) {
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
if (what & PUFFS_FBIO_READ && fio->rwait == 0) {
int rwait;
struct waithead rwait;
TAILQ_INIT(&rw->rwait);
w = &rw->rwait;
} else if (!TAILQ_EMPTY(&rw->rwait) && rw->o == NULL) {
wakeup_all(&rw->rwait);
timersub(&rtout, &rtime, &rwait);
if (rwait.tv_sec < 0)
rwait.tv_sec = rwait.tv_usec = 0;
else if (rwait.tv_sec == 0
&& rwait.tv_usec < 1000000/CLK_TCK)
rwait.tv_usec = 1000000/CLK_TCK;
(long int)rwait.tv_sec, (long int)rwait.tv_usec,
if (rwait.tv_sec != 0
if (!poll(set, 1, (int)(rwait.tv_sec * 1000 + rwait.tv_usec / 1000))) {
if (rwait.tv_sec == 0 && rwait.tv_usec == 0)
struct timeval rtime, rwait, rtout;