atomic64_fetch_dec_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic64_fetch_dec_relaxed πŸ’…

okay bestie so this page is straight out of the Kernel API Manual and it's the whole entire manual page for atomic64_fetch_dec_relaxed(9) β€” no filler, no skips, we're reading the whole thing together 🫢


🌸 NAME 🌸

atomic64_fetch_dec_relaxed β€” atomic decrement with relaxed ordering ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

s64 atomic64_fetch_dec_relaxed (atomic64_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic64_t πŸ’« (yes that's it, that's the whole list, we love a low-effort argument list)

✨ DESCRIPTION ✨

Atomically updates v to (v - 1) with relaxed ordering. So like, the decrement itself is fully atomic (no lost updates, no half-decrements, nobody's out here sniping your value mid-operation πŸ’…) β€” it's the ordering that's relaxed, and that's the whole vibe of this function.

⚠️ Unsafe to use in noinstr code; use raw_atomic64_fetch_dec_relaxed there instead. This is a hard no-cap warning, not a suggestion β€” literally do not do it πŸ™ˆ

πŸ’– RETURN πŸ’–

The original value of v. Not the new one, not the decremented one β€” the original, the before picture, the value v had before the decrement. Iconic behavior honestly πŸ”₯


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/atomic/atomic-instrumented.h and the entire atomic extended family, in the exact order the manual serves them up β€” yes we're listing every single one, grab a snack πŸ“


mwah πŸ’‹ that's the whole page, every last ref, no cuts. this one lives in ./include/linux/atomic, dated October 2026, and it signs off as atomic64_fetch_dec_relaxed(9) β€” periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from