thesis/linux-6.8.1/scripts/atomic/fallbacks/try_cmpxchg
2025-03-19 13:44:23 +01:00

7 lines
141 B
Text
Executable file

cat <<EOF
${int} r, o = *old;
r = raw_${atomic}_cmpxchg${order}(v, o, new);
if (unlikely(r != o))
*old = r;
return likely(r == o);
EOF