[Tinyos-devel] Resource arbitration bug in SerialP
Kevin Klues
klueska at gmail.com
Tue Sep 9 17:08:51 PDT 2008
I didn't look at it in detail, but I didn notice that it didn't comply
and that was part of the reason Maxime was seeing what he was. Other
than that I'm not sure. I only glanced at it briefly.
Kevin
On Tue, Sep 9, 2008 at 3:29 PM, Eric Decker <cire831 at gmail.com> wrote:
> Hi Kevin,
>
> What exactly is wrong with the serial code?
>
> Is it simply a matter of making the Serial Stack conform to
> SplitControl.start/done?
> Or are there other things that need to be mucked?
>
> eric
>
> On Mon, Sep 8, 2008 at 7:57 AM, Kevin Klues <klueska at gmail.com> wrote:
>>
>> After glancing briefly at the code, it looks to me like there are more
>> things wrong here than the simple fix you propose. Until now, no one
>> has really arbitrated access to the serial stack i.e. it has been a
>> dedicated resource on most platforms. Because of this, it seems like
>> it doesn't follow the proper semantics for SplitControl.start() and
>> SplitControl.stop() as outlined in TEP115. A proper fix would be to
>> get it in line with these specifications so that putting a resource
>> arbiter around it can work properly.
>>
>> Kevin
>>
>> On Mon, Sep 8, 2008 at 3:23 AM, Maxime Muller - s h o c k f i s h /
>> <maxime at shockfish.com> wrote:
>> > 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
>> > _______________________________________________
>> > Tinyos-devel mailing list
>> > Tinyos-devel at millennium.berkeley.edu
>> >
>> > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>> >
>>
>>
>>
>> --
>> ~Kevin
>> _______________________________________________
>> Tinyos-devel mailing list
>> Tinyos-devel at millennium.berkeley.edu
>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
>
>
> --
> Eric B. Decker
> Senior (over 50 :-) Researcher
> Autonomous Systems Lab
> Jack Baskin School of Engineering
> UCSC
>
>
--
~Kevin
More information about the Tinyos-devel
mailing list