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

Cory Sharp cory at moteiv.com
Sat Oct 15 11:53:25 PDT 2005


I think the interface change sounds good, since it's more directly
expresses in the intended use of the interface -- that sleep(TRUE) was
only intended for use inside the taskLoop anyway.

But, is the primary savings coming from having the "while no task"
loop inside the atomic section?  That seems like the only significant
practical change from the current method of while(1)
runNextTask(TRUE).

- Cory

On 10/15/05, David Gay <dgay42 at gmail.com> 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]();
>       }
>   }
>
> David
>

_______________________________________________
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