Repository URL to install this package:
|
Version:
20.11.0-trunk ▾
|
linux-headers-current-sunxi64
/
usr
/
src
/
linux-headers-5.8.10-sunxi64
/
scripts
/
atomic
/
fallbacks
/
inc_not_zero
|
|---|
cat <<EOF
/**
* ${arch}${atomic}_inc_not_zero - increment unless the number is zero
* @v: pointer of type ${atomic}_t
*
* Atomically increments @v by 1, if @v is non-zero.
* Returns true if the increment was done.
*/
static __always_inline bool
${arch}${atomic}_inc_not_zero(${atomic}_t *v)
{
return ${arch}${atomic}_add_unless(v, 1, 0);
}
EOF