> > I *sounds* like the problem you're trying to solve** is some thing like
> >      I want to efficiently read data from a serial line, returning
> > whenever at least
> >      250 bytes are available or when more then 0.1s has passed.
> >      If no data is received, it should still return after 0.1s.
> 
> No, read() should not return 10 times per second when there is "no
> data". It must depend on VMIN and VTIME. When 1 byte becomes
> available, the 0.1 timer starts, and further bytes do not restart it.
> A call to read() returns when VMIN is satisfied, or the timer expires
> by reaching 0.1. Tthe timer must not be "interbyte," restarted by
> further bytes. The worst case I described continually resets an
> interbyte timer, pushing it into the future, until VMIN overcomes the
> effect. That can take up to 20 seconds.

Are you saying OpenBSD does it wrong, or that all the operating systems
do it wrong?

Reply via email to