* Mathieu Desnoyers ([email protected]) wrote: > * Paolo Bonzini ([email protected]) wrote: > > On 11/12/2010 01:24 PM, Paolo Bonzini wrote: > >> Should I rename uatomic_add to uatomic_xchg_add too (I prefer this name > >> to uatomic_return_add)? > > > > Uh, uatomic_add returns void actually. Then returning void from > > uatomic_{and,or} is indeed more consistent. > > Ah! I knew we'd find the culprit!! ;-)
BTW, I'd be fine with adding: uatomic_and/uatomic_or (returning void) But I wonder if, on any architecture, there is a significantly better way to implement: uatomic_xchg_add/uatomic_xchg_or (returning the old value) other than using a cmpxchg() underneath ? If not, then creating this extra primitive would be pretty much useless. Thanks, Mathieu -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com _______________________________________________ ltt-dev mailing list [email protected] http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
