On Tue, Aug 25, 2009 at 12:02 PM, Yu Liu <[email protected]> wrote:

> Hi,
>
> I have a question about the TinyOS main loop. In the main function, there
> is an infinite loop to handle all the tasks (interrupts).
>

This is what handles tasks.  Interrupts pull the cpu out of this code.


>  As I know, the CPU will go into the idle state when there is no task to
> handle. My question is:  what will happen to this infinite loop in the idle
> state? Is the loop suspended? Thanks!
>

the sleep is inside of the run_task.  dig down deeper and you will see it.

eric


>
> int main(void)
> {
>   RealMain$hardwareInit();
>   RealMain$Pot$init(10);
>   TOSH_sched_init();
>
>   RealMain$StdControl$init();
>   RealMain$StdControl$start();
>   __nesc_enable_interrupt();
>   while (1)
>   {
>       TOSH_run_task();
>   }
> }
>
> Best Regards
> Yu
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
Autonomous Systems Lab
Jack Baskin School of Engineering
UCSC
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to