This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Performance patch to termios code
Paul Sheer wrote:
>
> > But if so, this patch
> > will break the MIN=0 case. With MIN=0,TIME=0
>
> > "the minimum of either the number of bytes requested or the number
> > of bytes currently available shall be returned without waiting
> > for more bytes to be input" according to the
> > standard.
>
> Then my patch is correct, because it returns the number of bytes
> available without waiting. Without my patch "OR THE NUMBER OF
> BYTES CURRENTLY AVAILABLE" is not implemented.
I'm not clear why you say that. This line:
*len = *len < dev_buf_conf.rx_count ? *len : dev_buf_conf.rx_count;
ensures that we only try to get the minimum of what's requested and the
number of bytes currently available.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine