raw_atomic6...turn_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so first things first bestie β€” welcome to the Kernel API Manual πŸ’– and today's main character is raw_atomic64_inc_return_acquire β€” atomic increment with acquire ordering. yes that's the whole name. it's a mouthful. we love her anyway πŸŽ€


🌸 SYNOPSIS 🌸

s64 raw_atomic64_inc_return_acquire (atomic64_t *v );

like. look at her. s64 in the front, atomic64_t *v in the back. iconic signature, no notes πŸ’… (and yes, the spacing up there is exactly how it's written β€” don't come for me, I'm just the messenger 🫢)


πŸ¦‹ ARGUMENTS πŸ¦‹

  • v β€” pointer to atomic64_t. that's it. that's the whole argument. she takes one (1) thing and she takes it well ✨

🧚 DESCRIPTION 🧚

okay so what does she actually do? bestie. she atomically updates v to (v + 1) with acquire ordering. that's the whole vibe. one function, one job, one increment, no cap πŸ”₯

and the important part, the part where you need to pay attention πŸ‘€ β€” she's safe to use in noinstr code. so if you're living that noinstr life, she's your girl.

but β€” and I cannot stress this enough β€” elsewhere? prefer atomic64_inc_return_acquire. like, this one is the raw one for a reason. she's the special-occasion friend, not the everyday one. lowkey that's the whole plot twist of this page πŸ’€

no invented lore here, bestie β€” that's literally all the description says. safe in noinstr, prefer atomic64_inc_return_acquire otherwise. periodt.

πŸ‘‘ RETURN πŸ‘‘

the updated value of v πŸ’– so you don't gotta go read it back yourself, she hands it to you. main character behavior.


🌈 SEE ALSO 🌈

she's got a whole extended universe of friends, I'm not even kidding, this is the longest group chat in the kernel 🫢 first up, the file she lives in:

  • Kernel file ./include/linux/atomic/atomic-arch-fallback.h

and now the family reunion β€” every single one of these, in order, no skipping πŸ™ˆ

πŸ’œ the 32-bit raw crew

πŸ“ the 64-bit raw crew (our girl's home turf)


and that's the page !! πŸ¦‹ go forth and increment, bestie. this little beauty comes to you from ./include/linux/atomic (that's where the kernel keeps her πŸ’–) and she's dated October 2026 β€” so she's fresh, she's glowing, she's got main character energy. slay βœ¨πŸŽ€πŸ’…

πŸ“¦ where this page comes from