[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Timer.fired
Ben Greenstein
bengreenstein at gmail.com
Thu May 19 20:00:49 PDT 2005
I like the 'when' variable very much and think the pattern
timer fired(){
gettimeofday...
}
is common enough to warrant putting it in the basic interface.
numMissed is less common and might better be provided by a separate
command.
On 5/19/05, Joe Polastre <joe.polastre at gmail.com> wrote:
> Except if an underlying interrupt occurred from an Alarm while I was
> asking (in task context) how many timers I missed.
>
> I agree with Phil, sounds like race conditions are going to pop up.
>
> Also, if I never use When or NumMissed in my code, ideally, the logic
> and variables necessary to keep that state would not be compiled into
> my app. I figure most apps probably don't care about this info or
> could infer it from the LocalTime interface.
>
> -Joe
>
> On 5/19/05, Cory Sharp <cory.sharp at gmail.com> wrote:
> > On 5/19/05, Philip Levis <pal at cs.berkeley.edu> wrote:
> > > That sounds like a possible race condition to me.
> >
> > The Timer interface is synchronous / task context. I'd imagine the
> > task that signals Timer.fired() would set some member variables that
> > the firedWhen() and firedNumMissed() access. I don't believe it's
> > possible for those values to change inappropriately.
> >
> > Cory
> >
> > _______________________________________________
> > 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
> >
>
> _______________________________________________
> 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
>
_______________________________________________
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-host-mote-wg
mailing list