raw_atomic64..._dec_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay so bestie, welcome to raw_atomic64..._dec_relaxed(9) from the Kernel API Manual. the actual function is raw_atomic64_fetch_dec_relaxed, and its whole thing is atomic decrement with relaxed ordering. iconic, honestly. πŸŽ€


✨ SYNOPSIS ✨

s64 raw_atomic64_fetch_dec_relaxed (atomic64_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • v β€” pointer to atomic64_t. that's the whole argument, bestie. it's giving β€œhand me the atomic64_t pointer and I'll handle the decrement.” πŸ’–

🌸 DESCRIPTION 🌸

Atomically updates v to (v - 1) with relaxed ordering. so yes, the decrement happens atomically, and the ordering vibe is relaxed. periodt. ✨

Safe to use in noinstr code; prefer atomic64_fetch_dec_relaxed elsewhere. like, if you're not in noinstr land, atomic64_fetch_dec_relaxed is the one to reach for. 🫢


πŸŽ€ RETURN πŸŽ€

The original value of v. not the new one, bestie β€” the value it had before the decrement. that's the return vibe. πŸ’œ


🌈 SEE ALSO 🌈

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

the whole raw_atomic_* fam, no gatekeeping:

and the raw_atomic64_* crew:


signed off with love by source/version ./include/linux/atomic, dated October 2026, for raw_atomic64..._dec_relaxed(9). slay, and happy decrementing πŸ’…βœ¨

πŸ“¦ where this page comes from