Files
Linux_Drivers/linux_5.10/scripts/atomic/fallbacks/add_negative
sam.xiang 5c7dd7acc3 [linux] create linux_5.10.4 from T-head official:
repo: https://github.com/T-head-Semi/linux
	commit: b1313fe517ca3703119dcc99ef3bbf75ab42bcfb

Change-Id: I6cbb35294024ea3a66140e311f4bb705fd7fd626
2023-03-10 20:32:41 +08:00

17 lines
416 B
Plaintext
Executable File

cat <<EOF
/**
* ${arch}${atomic}_add_negative - add and test if negative
* @i: integer value to add
* @v: pointer of type ${atomic}_t
*
* Atomically adds @i to @v and returns true
* if the result is negative, or false when
* result is greater than or equal to zero.
*/
static __always_inline bool
${arch}${atomic}_add_negative(${int} i, ${atomic}_t *v)
{
return ${arch}${atomic}_add_return(i, v) < 0;
}
EOF