On Mar 17, 2011, at 12:18 PM, Francisco Sant'anna wrote:
> Hello,
>
> I cannot make nesC to detect potential race conditions in my programs.
> For example, I can see in the compiler output the flag "-Wnesc-data-race" but
> no data race is detected for following code snippet:
>
> implementation
> {
> int my_global_var;
>
> event void Boot.booted () {
> call Timer.startPeriodic(10);
> call AMControl.start();
> }
> event void Timer.fired () {
> my_global_var = 1;
> }
> event void AMControl.startDone (error_t err) {
> my_global_var = 1;
> }
> }
>
> Am I missing something obvious here?
> I am using TinyOS 2.1.1.
Yes. All of those events are synchronous code: they can't preempt one another.
So there's no way for there to be a data race.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help