Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[linux-2.6-block.git] / scripts / atomic / fallbacks / try_cmpxchg
CommitLineData
ace9bad4 1cat <<EOF
ace9bad4 2 ${int} r, o = *old;
9257959a 3 r = raw_${atomic}_cmpxchg${order}(v, o, new);
ace9bad4
MR
4 if (unlikely(r != o))
5 *old = r;
6 return likely(r == o);
ace9bad4 7EOF