18c2ecf20Sopenharmony_cicat <<EOF
28c2ecf20Sopenharmony_ci/**
38c2ecf20Sopenharmony_ci * ${arch}${atomic}_sub_and_test - subtract value from variable and test result
48c2ecf20Sopenharmony_ci * @i: integer value to subtract
58c2ecf20Sopenharmony_ci * @v: pointer of type ${atomic}_t
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Atomically subtracts @i from @v and returns
88c2ecf20Sopenharmony_ci * true if the result is zero, or false for all
98c2ecf20Sopenharmony_ci * other cases.
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_cistatic __always_inline bool
128c2ecf20Sopenharmony_ci${arch}${atomic}_sub_and_test(${int} i, ${atomic}_t *v)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	return ${arch}${atomic}_sub_return(i, v) == 0;
158c2ecf20Sopenharmony_ci}
168c2ecf20Sopenharmony_ciEOF
17