raw_atomic_..._inc_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay so this is the Kernel API Manual page for raw_atomic_..._inc_relaxed(9), and the actual main character is raw_atomic_long_fetch_inc_relaxed β€” atomic increment with relaxed ordering. πŸ’…βœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

the signature is literally:

long raw_atomic_long_fetch_inc_relaxed (atomic_long_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_long_t. that's the whole argument list, bestie 🫢

πŸ’– DESCRIPTION πŸ’–

Atomically updates v to (v + 1) with relaxed ordering. so yes, it bumps the value by one in one atomic little moment, and the ordering vibe is relaxed. 😌✨

Safe to use in noinstr code; prefer atomic_long_fetch_inc_relaxed elsewhere. that's the caveat, no cap β€” noinstr is the safe zone, everywhere else you should be reaching for atomic_long_fetch_inc_relaxed. πŸ«‘πŸ’œ


⭐ RETURN ⭐

The original value of v β€” so you get the value from before the increment, not the new one. periodt. πŸ’…πŸ”₯


🌈 SEE ALSO 🌈

the whole atomic-long extended universe is here, no skips, no cap β€” and the kernel file is ./include/linux/atomic/atomic-long.h:


byeee 🫢✨ signing off with the footer deets: source/version ./include/linux/atomic, date October 2026, and page tag raw_atomic_..._inc_relaxed(9). πŸŽ€πŸ’œ

πŸ“¦ where this page comes from