[Tinyos-help] [PATCH] Blocking/buffering (was: Deadlock in C
sdk's write_serial_packet())
David Gay
dgay42 at gmail.com
Mon Jul 16 09:01:04 PDT 2007
On 7/13/07, Steve McKown <rsmckown at yahoo.com> wrote:
> Hi David,
>
> I have one more patch suggestion for the C SDK, to build upon your recent
> update to CVS. With the latest code and using a blocking serial source, one
> can get into a situation where the SDK has buffered one or more packets
> internally but it still blocks to do IO on the tty when calling
> read_serial_packet. Here's the call graph:
>
> read_serial_packet(src, &len);
> read_and_process(src, src->non_blocking); /* nb is FALSE */
> read_byte(src, non_blocking);
> serial_read(src, non_blocking, buffer, len);
> select(...);
>
> Patch below. Thanks!
Checked in, thanks!
David Gay
More information about the Tinyos-help
mailing list