Merge tag 'nfs-for-6.4-1' of git://git.linux-nfs.org/projects/anna/linux-nfs
[linux-block.git] / scripts / atomic / fallbacks / dec_and_test
CommitLineData
ace9bad4
MR
1cat <<EOF
2/**
f3e615b4 3 * arch_${atomic}_dec_and_test - decrement and test
ace9bad4
MR
4 * @v: pointer of type ${atomic}_t
5 *
6 * Atomically decrements @v by 1 and
7 * returns true if the result is 0, or false for all other
8 * cases.
9 */
765dcd20 10static __always_inline bool
f3e615b4 11arch_${atomic}_dec_and_test(${atomic}_t *v)
ace9bad4 12{
f3e615b4 13 return arch_${atomic}_dec_return(v) == 0;
ace9bad4
MR
14}
15EOF