[Tinyos-help] _nesc_atomic_start function

Eric Decker cire831 at gmail.com
Wed Nov 10 15:07:49 PST 2010

It is support code that helps to implement an atomic block.   The other
piece is _nesc_atomic_end

When you do

atomic {

The nesc front end inserts   an _nesc_atomic_start at the start and an
_nesc_atonic_end at the end of the block.

What these routines do is in practice disable interrupts and then reenable
them on the way out.    It keeps track of whether or not
interrupts are enabled on entry and only reenables if interrupts where on on

does that help?


On Wed, Nov 10, 2010 at 9:49 AM, Nived <nivedks at gmail.com> wrote:

> Hi,
> I was going through the intermediate c file generated from nesc
> compilation. i came across this function _nesc_atomic_start which executes a
> bunch of assembly instructions. Can anyone help me understand what this
> function may be doing ?
> Thanks
> Nived
> _______________________________________________
> Tinyos-help mailing list
> Tinyos-help at millennium.berkeley.edu
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Eric B. Decker
Senior (over 50 :-) Researcher
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20101110/1fb6770c/attachment.htm 

More information about the Tinyos-help mailing list