I believe you have it right. Except I'd have to go analyze the controller's
manuals to see if there is a notion of interrupt priority -- more likely
any enabled int can preempt a TOSH_INTERRUPT(). I think the A,B_EVENTS() will execute in the interrupt context from whence they were called. So
in this case SIGNAL(Y) will not fire and preempt SIGNAL(X) or A_EVENT().

But in _most_ cases pending interrupts will fire as soon as a TOSH_SIGNAL()
returns. So you are not likely to miss them unless you overrun by getting
more than one of the same type before you can service it.

MS

Man-Ki Yoon wrote:
Hi all.

I want to know the difference between TOSH_SIGNAL and TOSH_INTERRUPT.

AFAIK, TOSH_SIGNAL can’t be preempted by any other external interrupts!

On the other hand, TOSH_INTERRUPT can be preempted by other external interrupts which have higher priority!

Is it right?

If so, the execution thread starting from TOSH_SIGNAL can’t be preempted by any other external interrupts? Or only TOSH_SIGNAL portion?

In other words,

TOSH_SIGNAL(X) {

    signal A_MODULE.A_EVENT();

}

TOSH_SIGNAL(Y) {

    signal B_MODULE.B_EVENT();

}

Assume that A_MODULE.A_EVENT() is called by TOSH_SIGNAL and is executing, and at that time, TOSH_SIGNAL(Y) is fired.

1)      TOSH_SIGNAL(Y) can’t be fired.

2)      TOSH_SIGNAL(Y) can be fired. And it preempts A_MODULE.A_EVENT().

Which is correct?

Best regards,

Man-Ki Yoon


------------------------------------------------------------------------

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

Reply via email to