[Tinyos-devel] Resource arbitration bug in SerialP
Maxime Muller - s h o c k f i s h /
maxime at shockfish.com
Mon Sep 8 03:23:32 PDT 2008
Hi there,
Francois Ingelrest from LCAV @ epfl noticed a bug in
$TOSDIR/lib/serial/SerialP.nc
Description:
A call to SplitControl.stop() will eventually set txState to
TXSTATE_INACTIVE. Then calling SplitControl.start() wont set txState to
TXSTATE_IDLE thus locking the resource.
Possible fix:
task void startDoneTask() {
if(call SerialControl.start()==SUCCESS) {
if(txState == TXSTATE_INACTIVE)
txInit();
signal SplitControl.startDone(SUCCESS);
} else signal SplitControl.startDone(FAIL);
}
imho, the rx part should be ok as void rx_state_machine(...) restores
the right state.
Kind Regards,
maxime
More information about the Tinyos-devel
mailing list