Dear All,

The last sentences of the first paragraph of chapter 10 of the nesC 1.3
reference [1], says "Because tasks are not preempted and run to completion,
they are atomic with respect to each other, but are not atomic with respect
to interrupt handlers."
That means that an interrupt handler can preempt a task.

In the code listing 5.1 in chapter 5 of the TinyOS programming manual 2nd,
the line that invokes a task is included within an atomic compound
statement.
I understand that in nesC, "atomic" is implemented by disabling interrupts.
Is that correct?
If yes, then how come an interrupt handler will preempt a task given that
while a task is running interrupts are disabled according to listing 5.1?


Regards.


[1] nesC 1.3 Language Reference Manual, July 2009,
/nesC-1.3.1.tar.gz/nesc-1.3.1/doc/ref.pdf,
http://sourceforge.net/projects/nescc/files/
[2] TinyOS Programming 2nd Ed, July 2009,
csl.stanford.edu/~pal/pubs/tos-programming-web.pdf

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

Reply via email to