Re: [PATCH -v2 00/33] implement atomic_fetch_$op
From: Will Deacon
Date: Wed Jun 01 2016 - 10:06:23 EST
On Tue, May 31, 2016 at 12:19:25PM +0200, Peter Zijlstra wrote:
> As there have been a few requests for atomic_fetch_$op primitives and recently
> by Linus, I figured I'd go and implement the lot.
> The atomic_fetch_$op differs from the existing atomic_$op_return we already
> have by returning the old value instead of the new value. This is especially
> useful when the operation is irreversible (like bitops), and allows for things
> like test-and-set.
> This version incorporates all feedback from last time and is now complete thanks
> to Will implementing ARMv8.1-LSE versions.
> No known build breakage from the build-bot.
> - arc asm/atomic.h is a bit of a mess after the eznps merge, I would
> recommend a restructure or split of that file, but could not find
> the will to do it.
> - arc, metag and tile could convert to _relaxed.
> I'm aiming to merge this for v4.8 which should get this a fair few weeks in -next.
Thanks Peter, the arm/arm64 bits all look good to me.