On Tue, Mar 16, 2010 at 10:38 PM, Zheng Manchun <[email protected]> wrote:

> Hi all, is it true that a current executing interrupt handler can be
> preempted by a new interrupt handler?
> If yes,
> -- how does the old interrupt handler resume once the new interrupt handler
> completes its execution?
>

Its a cpu thing so you have to take a look at the cpu documentation.
 typically it will be using something like "return from interrupt",  rti.


> -- does TinyOS maintain sth like the queue of the scheduler to store the
> preempted interrupt handlers?
>

you are confusing execution levels.  When an interrupt handler is invoked it
will push information onto the current stack to save state.  If another
interrupt handler gets in then the same thing happens again.  When they
start to unwind this state is pulled of the stack.  LIFO.

TinyOS doesn't get involved at all in a scheduling sense.


> -- (assume that A, B, C are all some interrupt handlers) A is preempted by
> B, and B is preempted by C, then after C completes its execution, is the
> order of executing A , B restricted as B then followed by A?
>

I don't know what you mean here.  "restricted".   Since a stack is LIFO,
then when C returns, B resumes execution.  Then when B completes A will
continue executing.


I would suggest picking up a text book that talks about how cpus work.  A
good introduction to this kind of thing can be found in such a beast.


>
> --
> Thanks & Best Regards,
> Manchun
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>



-- 
Eric B. Decker
Senior (over 50 :-) Researcher
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to