[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Timer.fired
Cory Sharp
cory.sharp at gmail.com
Fri May 20 01:54:04 PDT 2005
Okay, here's a even more simple counter proposal from talking with
Joe, which boils down to "in this respect, go back to TinyOS1.x":
1) The timer subsystem assumes it can execute a periodic timer at the
requested frequency
2) A periodic timer that falls behind will play catch up like TinyOS
1.x timer code, not compute skip-ahead like the TinyOS 2.x timer code
3) We drop direct support for "when" and "numMissed". "when" can be
computed from the gett0() and getdt() functions already provided.
"numMissed" would not longer make sense.
This makes more simple and smaller timer code by removing the integer
modulus and integer divide used to calculate the skip-ahead. For the
MSP430, this saves 200 ROM bytes. This also simplifies the Timer
interface.
I think this pulls back some of the over-engineering I was trying to
do on the Timer interface and comes back to the basics.
Cory
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.
>
> -Joe
>
> On 5/19/05, Cory Sharp <cory.sharp at gmail.com> wrote:
> > 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 don't understand. What are you and Phil thinking is going to happen
> > in this case that's bad? An interrupt occurs and another task is
> > posted...
> >
> > 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
More information about the Tinyos-host-mote-wg
mailing list