Nonblocking UART driver using _write_r - error if no data was written?
MikuslawProxy
mikuslawproxy@gmail.com
Wed Feb 26 19:54:00 GMT 2014
Hi Corinna, Freedie
I have to say, I have to stop making assumptions without checking
them. Now when I think about it that makes some sense that fflush will
not block with a nonblocking driver.
Freddie, I know - I will have to rethink my driver solution. The
solution with cyclic buffer and interrupt has the advantage of cpu
free operation, but now I think that it will be better to block if
data will not fit in the cyclic buffer. This way I can increase the
size of cyclic buffer and turn off sdio buffering.
Thank you both for help! I got a lot of new ideas and hints how to proceed.
On Wed, Feb 26, 2014 at 3:57 PM, Freddie Chopin <freddie_chopin@op.pl> wrote:
> W dniu 2014-02-26 15:33, MikuslawProxy pisze:
>
>> So, is it a bug that we don't check the write for EAGAIN errno, so we
>> can loop on that in fflush?
>
>
> Take a wider look - you expect your non-blocking driver to block (; Just
> convert your code to be blocking and the problem would be solved.
>
> Regards,
> FCh
More information about the Newlib
mailing list