On 04/16/2010 05:18 AM, Paolo Bonzini wrote:
I'd just use __sync_fetch_and_or here.Good idea. I think we can zap the memory barrier and fix a small race while being at it, see the incremental fix below.Not sure about the memory barrier semantics of __sync_* (rth?), but besides that the patch seems like a good idea.
The semantics of __sync_*, with only 2 exceptions, is full barrier. r~