raw_atomic_long_add_return(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_long_add_return β€” Kernel API Manual

okay so bestie, welcome to the raw_atomic_long_add_return page ✨ this is from the Kernel API Manual and it's genuinely one of those "small function, big personality" situations. it does one thing, it does it atomically, and it does it with full ordering. no notes. πŸŽ€


🌸 NAME 🌸

raw_atomic_long_add_return β€” atomic add with full ordering, iykyk πŸ’…


✨ SYNOPSIS ✨

long raw_atomic_long_add_return (long i , atomic_long_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • i β€” the long value you're adding. yes it's just the number going in, she's the main character of the addition πŸ’–
  • v β€” pointer to atomic_long_t. this is the thing getting updated, bestie 🫢

πŸ’œ DESCRIPTION πŸ’œ

so basically, it atomically updates v to (v + i) with full ordering. that's it, that's the whole vibe. no cap, it does exactly what it says on the tin ✨

it's also safe to use in noinstr code β€” which, iconic. but listen: prefer atomic_long_add_return everywhere else, okay? raw_ is for the special noinstr situations, not for everyday slaying πŸ™ˆ


🌈 RETURN 🌈

the updated value of v β€” she gives you the result after the add, so you don't gotta do the math yourself πŸ’…


⭐ SEE ALSO ⭐

the kernel file it lives in:

  • ./include/linux/atomic/atomic-long.h

and the whole friend group, fr fr β€” the entire atomic_long family, no gatekeeping πŸ‘‘


lowkey that's a lot of siblings but they all ate πŸ’€ every single one of them has a page, go read 'em iykyk

and that's the page bestie!! 🧚 this one's from the source file ./include/linux/atomic, dated October 2026, and the header title is raw_atomic_long_add_return(9) under the Kernel API Manual β€” mwah, periodt πŸ’–πŸ“β­

πŸ“¦ where this page comes from