local_add_negative(9)
π NAME π
okay so bestie, welcome to the local_add_negative(9) page from the Kernel API Manual β yes, that's the manual name, and this function is literally called local_add_negative, and it adds something then tells you if the result is negative. main character energy fr fr πΈ.
β¨ SYNOPSIS β¨
bool local_add_negative (long i , local_t *l );
π ARGUMENTS π
iβ the integer value to add. that's it, that's the number going in πlβ a pointer to typelocal_t. yes,local_t, not plainlocalβ copy the type exactly, bestie π«Ά
π« DESCRIPTION π«
so the way this works: it atomically adds i to l, then returns true if the result is negative, or false when the result is greater than or equal to zero. that's the whole description β no extra lore, just the atomic add and the true/false vibe check π₯.
π SEE ALSO π
- Kernel file
./arch/x86/include/asm/local.h local_sub_and_test(9)local_dec_and_test(9)local_inc_and_test(9)local_add_return(9)local_add_unless(9)
go read those if you want the full local family lore π
cute sign-off: the footer source/version is ./arch/x86/include/asm, dated October 2026. bye bestie, go add your negatives with confidence πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms