mirror of
https://gitee.com/open-loongarch/linux-6.12.git
synced 2026-10-26 04:57:12 +08:00
8 lines
141 B
Plaintext
Executable File
8 lines
141 B
Plaintext
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
|