xref: /linux/scripts/atomic/fallbacks/dec_and_test (revision 02680c23d7b3febe45ea3d4f9818c2b2dc89020a)
1cat <<EOF
2/**
3 * ${arch}${atomic}_dec_and_test - decrement and test
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 */
10static __always_inline bool
11${arch}${atomic}_dec_and_test(${atomic}_t *v)
12{
13	return ${arch}${atomic}_dec_return(v) == 0;
14}
15EOF
16