[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] proposed Scheduler interface change

Philip Levis pal at cs.stanford.edu
Sat Oct 15 11:55:07 PDT 2005


On Oct 15, 2005, at 11:40 AM, David Gay wrote:

> On 10/15/05, Cory Sharp <cory at moteiv.com> wrote:
>
>> What does the optimized taskLoop() code look like?  - Cory
>>
>
>   command void Scheduler.taskLoop()
>   {
>     for (;;)
>       {
>     uint8_t nextTask;
>     atomic
>         while ((nextTask = popTask()) == NO_TASK)
>         __nesc_atomic_sleep();
>
>     signal TaskBasic.runTask[nextTask]();
>       }
>   }


Interesting inversion from the 1.x code. Make the common case the  
inner loop. Good call.

Phil
_______________________________________________
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