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

Avinash Sridharan avinash.sridharan at gmail.com
Thu Jan 4 19:30:53 PST 2007


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

regards,
Avinash

On 1/4/07, Philip Levis <pal at cs.stanford.edu> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20070104/e72b9e2c/attachment.htm


More information about the Tinyos-help mailing list