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 : 18.117.168.40


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/dec_if_positive

cat <<EOF
static inline ${ret}
${atomic}_dec_if_positive(${atomic}_t *v)
{
	${int} dec, c = ${atomic}_read(v);

	do {
		dec = c - 1;
		if (unlikely(dec < 0))
			break;
	} while (!${atomic}_try_cmpxchg(v, &c, dec));

	return dec;
}
EOF