Re: [Tinyos-help] async and warnings

2007-07-06 Thread Hui KANG
This is because you assign a value to a global variable in an asys event. It should be protected by "atomic". Hui Kang On 7/5/2007, "Philip Levis" <[EMAIL PROTECTED]> wrote: >On Jul 5, 2007, at 9:36 AM, Jordi Casals wrote: > >> Hi, >> >> I have a little problem. My program uses async events (fr

Re: [Tinyos-help] async and warnings

2007-07-05 Thread Philip Levis
On Jul 5, 2007, at 9:36 AM, Jordi Casals wrote: Hi, I have a little problem. My program uses async events (from Uart0 on micaz, T2) and I change a variable into them. I know that it is dangerous and I use the atomic statement when I want to change the value in another function... My expla

[Tinyos-help] async and warnings

2007-07-05 Thread Jordi Casals
Hi, I have a little problem. My program uses async events (from Uart0 on micaz, T2) and I change a variable into them. I know that it is dangerous and I use the atomic statement when I want to change the value in another function... My explanation is very bad, and I put an example: _