1
0
Fork 0
linux/scripts/atomic/fallbacks/dec_unless_positive
Daniel Baumann 79d69e5050
Adding upstream version 6.12.33.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 12:14:28 +02:00

10 lines
164 B
Text
Executable file

cat <<EOF
${int} c = raw_${atomic}_read(v);
do {
if (unlikely(c > 0))
return false;
} while (!raw_${atomic}_try_cmpxchg(v, &c, c - 1));
return true;
EOF