[Tinyos-help] warnings while compile with latest tinyos-2.x release

Philip Levis pal at cs.stanford.edu
Thu Jan 4 19:13:04 PST 2007


On Jan 4, 2007, at 11:00 AM, Avinash Sridharan wrote:

> Hi,
>  I just moved my code from the beta2 release of tinyOS-2.x to the  
> latest release of tinyOS-2.x (Nov 6th). I got the following  
> compilation warnings when I compiled my nesC app for the telosb  
> platform.
>
> /opt/msp430/msp430/include/msp430/gpio.h:128: warning: non-atomic  
> accesses to shared variable `P2IE':
> /home/asridhar/developement/sandbox/tinyos-2.x-t2/tos/chips/msp430/ 
> pins/HplMsp430InterruptP.nc:186: warning:   non-atomic r/w
>
>
> The compilation itself went through fine. I wanted to know the  
> implication of these warnings and wether it would cause any race  
> conditions while running the applications on Tmotes. I checked my  
> msp430-gcc and msp430-libc installation and the versions are the  
> same as the rpms given on the TinyOS-2.x installation website.
>

Hm. This is weird. I've never seen the issue before. I would  
recommend calling enable() in an atomic section.

My guess is that almost every call to these functions is in an atomic  
section, so you generally do not see this warning. The issue is that

x |= b;

is a read-modify-write.

Phil



More information about the Tinyos-help mailing list