Thanks!
As I said, I'm not an assembly programmer. I can copy/paste though, which
lead to the verbosity. :-)
On Mon, Aug 11, 2014 at 2:34 PM, Peter Dimov
Lars Hagström wrote:
inline void atomic_write32(volatile boost::uint32_t *mem, boost::uint32_t
val) { __asm__ __volatile__ ( "" ::: "memory" ); __asm__ ( "xchgl %0, %1" : "+r" (val), "+m" (*mem) ); __asm__ __volatile__ ( "" ::: "memory" ); }
This will work, but it's more verbose than it needs to be. You can put the __volatile__ and "memory" on the xchg asm statement and take out the two others.
You'll also need to fix atomic_read32:
{ uint32 r = *mem;
__asm__ __volatile__ ( "" ::: "memory" ); return r;
}
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/ mailman/listinfo.cgi/boost