projects
/
linux-block.git
/ blame
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blob
|
blame
(incremental) |
history
|
HEAD
Merge tag 'pci-v6.16-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
[linux-block.git]
/
scripts
/
atomic
/
fallbacks
/
dec_if_positive
Commit
Line
Data
ace9bad4
1
cat <<EOF
9257959a
2
${int} dec, c = raw_${atomic}_read(v);
ace9bad4
MR
3
4
do {
5
dec = c - 1;
6
if (unlikely(dec < 0))
7
break;
9257959a
8
} while (!raw_${atomic}_try_cmpxchg(v, &c, dec));
ace9bad4
MR
9
10
return dec;
ace9bad4
11
EOF