* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 20/11/2014 12:45, Dr. David Alan Gilbert wrote: > > > For this case QEMU has atomic_read/atomic_set (corresponding to > > > __ATOMIC_RELAXED in C/C++1x), so you could use those as well. > > > > Ah, so those look like they just volatile cast anyway. > > Yeah, but it explicitly shows that the assignment is a) for a > multi-threaded operation b) using relaxed semantics. It attaches the > information to the use instead of the variable; it just happens that > volatile is the pre-C11 way to express those.
OK, I'll use those anyway; Ideally what I'd have is a way to mark something so that it'd compile-time-fail if I didn't use an atomic_ on it, because it's the type of thing that I'm bound to forget somewhere. Dave > > Paolo -- Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK