xref: /openbmc/linux/scripts/atomic/fallbacks/try_cmpxchg (revision b755c25fbcd568821a3bb0e0d5c2daa5fcb00bba)
1cat <<EOF
2	${int} r, o = *old;
3	r = raw_${atomic}_cmpxchg${order}(v, o, new);
4	if (unlikely(r != o))
5		*old = r;
6	return likely(r == o);
7EOF
8