Thanks Phil,
 I just put the enable() in atomic section and the warnings went away.

regards,
Avinash

On 1/4/07, Philip Levis <[EMAIL PROTECTED]> wrote:

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




--
Phd Dept. of Electrical Engineering
University of Southern California
http://www-scf.usc.edu/~asridhar
_______________________________________________
Tinyos-help mailing list
Tinyos-help@Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to