[Tinyos-8051wg] Re: [Tinyos-2.0wg] Timer.fired
Philip Levis
pal at cs.berkeley.edu
Thu May 19 18:52:53 PDT 2005
On May 19, 2005, at 6:12 PM, Cory Sharp wrote:
> I think the current TEP 102 Timers proposal is very good, and I'd like
> to clean up some remaining issues.
>
> One concern is the current Timer.fired event specified as
>
> event void Timer.fired( uint32_t when, uint32_t numMissed );
>
> The problem is that the fired event is in the "basic" interface, and I
> would consider the "when" and "numMissed" parameters part of an
> "advanced" interface. And, I think I would like to minimize
> complexity for the common case -- which is to have the fired event
> take no parameters.
>
Yes. It will also make the code more efficient.
> A counter proposal is to put two additional commands into timer
> interface -- firedWhen and firedNumMissed -- that only return valid
> values when called within a fired event. This places a burden of an
> additional 8 bytes of RAM on the component for the benefit of a
> significantly simplified fired event signature.
>
> // basic interface
> event void Timer.fired();
>
> // advanced interface
> command uint32_t Timer.firedWhen();
> command uint32_t Timer.firedNumMissed();
>
That sounds like a possible race condition to me.
Phil
-------
"We shall not cease from exploration
And the end of all our exploring
Will be to arrive where we started
And know the place for the first time."
- T. S. Eliot, 'Little Gidding'
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
More information about the Tinyos-8051wg
mailing list