raw_atomic_...turn_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_inc_return_acquire(9) πŸ’…

okay bestie, welcome to the Kernel API Manual ✨ β€” this one's a single function out of the giant raw_atomic family tree, so let's get into it 🫢


🌸 NAME 🌸

raw_atomic_inc_return_acquire β€” atomic increment with acquire ordering. that's it, that's the whole personality πŸ’–


✨ SYNOPSIS ✨

int raw_atomic_inc_return_acquire (atomic_t *v );

literally just hand it a pointer and it does the thing πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_t. yes queen, the actual atomic variable you want to bump πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So like β€” atomically updates v to (v + 1) with acquire ordering. one clean little increment, no torn reads, no drama πŸ’…

ngl the important bit: it's safe to use in noinstr code 😭 which is like the fancy exclusive club of kernel contexts. but everywhere else? prefer atomic_inc_return_acquire instead. fr fr, that's the takeaway 🫢


⭐ RETURN ⭐

The updated value of v. so like, the new number after the increment, not the old one πŸ’–


🌈 SEE ALSO 🌈

the whole fam is here, no cap β€” this is the full guest list πŸ‘‘

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

and now the icons themselves ✨


okay that's the whole page, bestie!! you ate that πŸ“ this little icon lives in ./include/linux/atomic, and this edition dropped October 2026 β€” so like, go forth and increment atomically with acquire ordering, mwah πŸ’œπŸ§š

πŸ“¦ where this page comes from