On May 14, 2008, at 1:22 PM, Frederic Beaulieu wrote:

> I’m just looking in the scheduler task loop and I wonder how an  
> event generated by an interrupt can post a task if the while loop  
> waiting for a task is in atomic section (see code below)??? It seems  
> very strange.
>
>   command void Scheduler.taskLoop()
>   {
>     for (;;)
>     {
>       uint8_t nextTask;
>
>       atomic
>       {
>       while ((nextTask = popTask()) == NO_TASK)
>       {
>         call McuSleep.sleep();
>       }
>       }
>       signal TaskBasic.runTask[nextTask]();
>     }
>   }
>

The call to sleep re-enables interrupts. Section 3 of TEP 112 goes  
into this.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to