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

Cory Sharp cory.sharp at gmail.com
Fri May 20 10:21:12 PDT 2005


I made the executive decision that taking out "when" and "numFired"
was the right thing to do.  Anyone with strong feelings the other
direction will now have to argue for putting it back in.  I'm mean
like that :)...

As a side effect, the TinyOS 2.x Blink compiles to within 100 bytes of
an equivalent TinyOS 1.x application.

    compiled TOS2BlinkC to build/telosb/main.exe
            2946 bytes in ROM
              62 bytes in RAM

    compiled TOS1BlinkC to build/telosb/main.exe
            2854 bytes in ROM
              64 bytes in RAM

 - Cory

On 5/20/05, Cory Sharp <cory.sharp at gmail.com> wrote:
> 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-8051wg mailing list