[Tinyos-devel] Bug in timer system
Kevin Klues
klueska at gmail.com
Tue Mar 4 10:44:07 PST 2008
While were at it, does it make sense to guarantee that timers (or
alarms for that matter) fire in the order they were set? The way its
implemented now, if there are two timers Timer0 and Timer1 set as
follows:
Timer1.startOneShot(200);
Timer0.startOneShot(201);
if Timer0 is instantiated with id 0 and Timer1 is instantiated with id
1 as the result of a call to unique(), then its possible that
Timer0.fired() may be signaled before Timer1.fired() is signaled if
there is a delay in processing the Timer task below the virtualizer
code. In 99% of the cases this isn't important, but if code is
written that relies on Timer1 firing before Time0, this may be an
issue.
Kevin
On Tue, Mar 4, 2008 at 9:50 AM, Philip Levis <pal at cs.stanford.edu> wrote:
>
> On Mar 4, 2008, at 7:54 AM, Jan Hauer wrote:
>
> > FYI: the timer.fired() bug has been reported before
> > (http://sourceforge.net/tracker/index.php?
> > func=detail&aid=1572439&group_id=28656&atid=393934)
> > - and Michiel Konstapel claims that they have send a bug report to the
> > mailing list some time ago also - let's fix this now !!!
> >
>
> Agreed. Part of the issue is that the author of the timer library is
> no longer actively supporting it, so it fell on the floor.
>
> Can you validate that the suggested fix? If you do, I'll commit it
> (or you can...).
>
> Phil
>
>
> _______________________________________________
> Tinyos-devel mailing list
> Tinyos-devel at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-devel
>
--
~Kevin
More information about the Tinyos-devel
mailing list