> --- In AVR-Chat@yahoogroups.com, Bob Paddock <bob.paddock@...> wrote: > > Volatile is never the solution to a problem with threads. > Nonsense. The volatile attribute is precisely the solution for *any* situation where a variable can be changed by an outside actor - even if it is another task. No. http://blog.regehr.org/archives/28 "Nine ways to break your systems code using volatile" See #8. Volatile means that all reads and writes happen to an address, even if the compiler thinks they are not needed. This has nothing to do with concurrent access, which you have pointed out. > As I noted, volatile doesn't address atomicity of access nor (as you alluded to) does it address serialization of resource access. Those are different problems with different solutions. Correct.
Message
Re: [AVR-Chat] Re: gcc compiler bad behaviour
2012-04-14 by Bob Paddock
Attachments
- No local attachments were found for this message.