raw_atomic_long_fetch_sub(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_long_fetch_sub(9) β€” Kernel API Manual, but make it cute πŸ’…

✨ NAME ✨

Okay so this page is raw_atomic_long_fetch_sub β€” the atomic subtract with full ordering bestie. That's the whole name, no cap. It's giving "subtract a long, atomically, with the full ordering vibe." πŸ’–

🌸 SYNOPSIS 🌸

long raw_atomic_long_fetch_sub (long i , atomic_long_t *v );

Yes, that's the signature exactly β€” don't come for me about the spaces, it's literal. 🫢

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” a long value to subtract. This is the amount being taken away, okay? πŸ’…
  • v β€” pointer to atomic_long_t. This is the atomic long getting updated, and she's the main character. πŸ‘‘

πŸ’« DESCRIPTION πŸ’«

It atomically updates v to (v - i) with full ordering. Like, the update happens atomically and the ordering is full β€” both details are doing important work here. ✨

Heads up: it's safe to use in noinstr code; elsewhere, prefer atomic_long_fetch_sub. That's the documented preference, bestie β€” no extra lore, just follow the page. 🫑

πŸ¦‹ RETURN πŸ¦‹

It returns the original value of v. So you get the original value, not the new one. Keep that receipt. πŸ§ΎπŸ’–

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/linux/atomic/atomic-long.h β€” yes, that exact path, no edits. πŸŽ€

The whole atomic-long squad, in the same order as the page, no omissions:


source/version: ./include/linux/atomic Β· date: October 2026 Β· manual: raw_atomic_long_fetch_sub(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from