blob: 061ba0ada157730f05166a018fcb420face5e497 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
if /bin/sh ${ATOMICDIR}/chkdup.sh arch_${atomic}_sub_and_test sub_and_test
then
cat <<EOF
/**
* arch_${atomic}_sub_and_test - subtract value from variable and test result
* @i: integer value to subtract
* @v: pointer of type ${atomic}_t
*
* Atomically subtracts @i from @v with full ordering.
* Returns @true if the result is zero, or @false for all
* other cases.
*/
EOF
fi
cat <<EOF
static __always_inline bool
arch_${atomic}_sub_and_test(${int} i, ${atomic}_t *v)
{
return arch_${atomic}_sub_return(i, v) == 0;
}
EOF
|