☰
Debian Codegraph
@
7.2.8-1
7.2.7-1
7.2.6-1
7.1.9-1
7.1.4-1
7.0.9-1
7.0.12-2
/
/
scripts
/
atomic
/
fallbacks
/
inc_unless_negative
☽
☼
scripts/atomic/fallbacks/inc_unless_negative
code
plain
raw
GPL-2
1991-2012 Linus Torvalds and many others
debian/copyright
1
cat <<EOF
2
${int} c = raw_${atomic}_read(v);
3
4
do {
5
if (unlikely(c < 0))
6
return false;
7
} while (!raw_${atomic}_try_cmpxchg(v, &c, c + 1));
8
9
return true;
10
EOF