raw_atomic_l...turn_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_l...turn_relaxed β€” Kernel API Manual ✨

okay so bestie, welcome to the group chat πŸ’– you're looking at the man page for raw_atomic_long_inc_return_relaxed(9), straight out of the Kernel API Manual. yes the title is truncated with dots, no that's not a typo, that's just how the man page generator woke up that day 😭 anyways. sit down, hydrate, and let's talk about adding one (1) to a number in the most unbothered way physically possible.


🌸 NAME 🌸

raw_atomic_long_inc_return_relaxed β€” atomic increment with relaxed ordering

like yes queen, add one, but make it chill about it πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

long raw_atomic_long_inc_return_relaxed (atomic_long_t *v );

that's the whole signature. that's the vibe. that's the function. πŸŽ€


✨ ARGUMENTS ✨

  • v β€” pointer to atomic_long_t. it's a pointer, it points at an atomic_long_t, that's the entire lore fr fr 🫢

πŸ”₯ DESCRIPTION πŸ”₯

so what does it do?? bestie it atomically updates v to (v + 1) β€” with relaxed ordering. that's it. that's the whole job. it adds one to the thing your pointer is pointing at, and it does it atomically, so nobody else can sneak in mid-update and cause chaos. main character energy only πŸ‘‘

the relaxed ordering part is doing a lot of heavy lifting here β€” it's the ordering-lite option, so don't go assuming it's giving you sequencing guarantees it never promised. it's relaxed. it's on vacation. let it live 😌

safe to use in noinstr code β€” that's a real thing and it matters, okay?? 🌈 but everywhere else, prefer atomic_long_inc_return_relaxed. yes, they look basically identical. no, that is not a bit. the raw one is for the special noinstr zone, the non-raw one is for literally everywhere else. iykyk 🧚

πŸ’€ heads up: this is the relaxed variant and the raw variant simultaneously. if you didn't specifically need those two things, you probably clicked the wrong man page. no shade. just saying.

⭐ RETURN ⭐

returns the updated value of v πŸ’–

so if v was 41, congratulations, you now have 42 in your hands and you didn't even have to worry about a race condition to get it. slay πŸŽ€


🌈 SEE ALSO 🌈

okay this is the part where i need you to brace yourself because the kernel really said "here's the entire atomic_long cinematic universe" and dumped the whole cast list on us 😭 every single one of these is a real man page, every single one is invited to the function, no cap:

like. ninety-ish man pages. the atomic_long family reunion is packed and everyone showed up in their best fit 🫢 go read them if you're nosy, we support curiosity here.


and that's the whole page, bestie!! πŸŽ€ this little beauty lives in ./include/linux/atomic and it was stamped October 2026 β€” so go forth, increment your longs, keep it relaxed, and remember: raw is for noinstr, everything else gets the polite version. mwah πŸ’–πŸ’…βœ¨

πŸ“¦ where this page comes from