Hi all,

According to the book "TinyOS programming", a variable has to be protected
by an atomic statement if it is accessed from an async function (Page 196).
But I find in many cases where "atomic" is used to protect variables
accessed only within an sync function. For instance, in the routing engine
of CTP (CtpRoutintEngineP.nc), "state_is_root" is only visited in sync
functions like RootControl.setRoot(), but still wherever it appears, there
is "atomic". Could anyone help me understand where exactly I should use
"atomic"? Thanks very much.

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

Reply via email to