On Tue, Mar 15, 2016 at 01:32:53PM +0100, Ingo Molnar wrote: > So if we are still on the same page at this point, we'd have to add a pointer > variant too I suspect: > > cmpxchg_ptr() > xchg_ptr()
We typically call those _long(), like atomic_long_t etc.. Under the assumption that sizeof(long) == sizeof(void *). Also, _IF_ we're going to do this, this is the perfect opportunity to also introduce the __atomic address space and load() and store() operations. This is needed for architectures where: cmpxchg()/xchg() isn't safe against regular stores, like all those who implement atomics using hashed spinlocked. Its going to be a horrid lot of work though :/