0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 3.17.175.191


Current Path : /lib/modules/5.4.0-1103-aws/build/scripts/atomic/fallbacks/
Upload File :
Current File : //lib/modules/5.4.0-1103-aws/build/scripts/atomic/fallbacks/inc_unless_negative

cat <<EOF
static inline bool
${atomic}_inc_unless_negative(${atomic}_t *v)
{
	${int} c = ${atomic}_read(v);

	do {
		if (unlikely(c < 0))
			return false;
	} while (!${atomic}_try_cmpxchg(v, &c, c + 1));

	return true;
}
EOF