18c2ecf20Sopenharmony_cicat <<EOF
28c2ecf20Sopenharmony_ci/**
38c2ecf20Sopenharmony_ci * ${arch}${atomic}_add_negative - add and test if negative
48c2ecf20Sopenharmony_ci * @i: integer value to add
58c2ecf20Sopenharmony_ci * @v: pointer of type ${atomic}_t
68c2ecf20Sopenharmony_ci *
78c2ecf20Sopenharmony_ci * Atomically adds @i to @v and returns true
88c2ecf20Sopenharmony_ci * if the result is negative, or false when
98c2ecf20Sopenharmony_ci * result is greater than or equal to zero.
108c2ecf20Sopenharmony_ci */
118c2ecf20Sopenharmony_cistatic __always_inline bool
128c2ecf20Sopenharmony_ci${arch}${atomic}_add_negative(${int} i, ${atomic}_t *v)
138c2ecf20Sopenharmony_ci{
148c2ecf20Sopenharmony_ci	return ${arch}${atomic}_add_return(i, v) < 0;
158c2ecf20Sopenharmony_ci}
168c2ecf20Sopenharmony_ciEOF
17