Termios: Non-blocking read() working? .-
Joris van Rantwijk
jorisvr at sron.nl
Mon Jun 11 08:55:08 UTC 2012
On Monday 11 June 2012 10:09 Sebastian E. Garcia wrote:
> 1. Gaisler's UART ISR and rtems_termios_enqueue_raw_characters function
> seems OK at first glance.
That stuff is inside "#if CONSOLE_USE_INTERRUPTS".
Are you sure it is enabled?
> Without having so much experience with Termios, the behavior I expect
> when VTIME==VMIN==0, is to read at once (non-blocking):
> Min{No. of bytes requested by read(); No. of bytes in the raw buffer}
> , and return ASAP.
That is also what I would expect.
> But in this code, when VMIN==0, only one char from the raw buffer gets
> copied.
I don't see that.
The line marked "SG" causes the outer loop to exit ASAP, i.e. no waiting for more data to come in. In the mean time, the inner loop can still collect multiple bytes if they are available in the queue. Right?
Joris.
More information about the users
mailing list