[Tinyos-8051wg] Re: [Tinyos-2.0wg] Timer.fired

David Gay dgay42 at gmail.com
Fri May 20 09:50:27 PDT 2005


On 5/19/05, Joe Polastre <joe.polastre at gmail.com> wrote:
> No, an interrupt occurs, the Timer says "we haven't missed anything"
> and now the result is bad.  You're operating under the assumption that
> Phil and I know the line by line code details of the Timer (which I
> certainly will never quite understand), whereas we're just trying to
> point out the potential for some pretty nasty race conditions.

Well that objection was true when those arguments were passed as
function arguments too, so the proposed change makes no difference.
More philosophically, it's really an unavoidable race condition: if I
ask "give me the number of interrupts missed until NOW", this value
will always be out of date by the time I examine it.

If you really want to avoid this kind of problem, you need to go and
read about synchronous languages (google for Esterel, for instance).
But I'm fairly sure we don't want to go there ;-)

David

_______________________________________________
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