On Friday 24 July 2009, Jeroen N. Witmond [Bahco] wrote: > Julian Seward wrote: > > Not really. On x86 and amd64, all atomic instructions are translated > > using a loop, which fetches the old value, computes the new value, and > > uses a compare-and-swap to either stuff the new value in, or detect that > > the old value has changed, in which case it starts over. > > Do I read this correctly, and will the application being Valgrinded never > observe a failing compare-and-swap? Just curious. :)
Er, ok. What I wrote was a bit confusing. The description above is a way to translate atomic inc/dec/add etc using CAS. cmpxchg et al are simply translated using a CAS, with no loop. J ------------------------------------------------------------------------------ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
