|
From: | Simon Kallweit |
Subject: | [lwip-devel] Re: [bug #26397] SLIP polling support |
Date: | Tue, 25 Aug 2009 13:59:42 +0200 |
User-agent: | Thunderbird 2.0.0.23 (X11/20090817) |
Simon Goldschmidt wrote:
Follow-up Comment #8, bug #26397 (project lwip):Actually ppp.c uses sio_read() in blocking mode. It uses sio_read_abort() to cancel the blocking sio_read() calls.So the SLIP-polling patch wouldn't work, either, since both sio_read and sio_recv are blocking, which means the function sio_poll would block, too!
No, it wouldn't. I would first like to fix the sio API and then see how to best implement SLIP polling.
In that case, there's no alternative to a new function, I guess. I'd be OK with sio_tryread() or something like that (try- to stay with the naming convention we already have - e.g. in sys_mbox_tryfetch).
Well, sio_tryread() would be the same as sio_read() but non-blocking? We could also add a function to peek at how many characters are waiting in line. But sio_tryread() sounds fine to me.
Shall I write a patch for sio.h?
[Prev in Thread] | Current Thread | [Next in Thread] |