raw_atomic_long_sub_return(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

raw_atomic_long_sub_return(9) πŸ’…

okay so we're in the Kernel API Manual, bestie, and this page is all about raw_atomic_long_sub_return. it's giving atomic math with full ordering, and honestly? iconic. ✨


🌸 NAME 🌸

raw_atomic_long_sub_return β€” atomic subtract with full ordering. periodt. πŸ’–

✨ SYNOPSIS ✨

long raw_atomic_long_sub_return (long i , atomic_long_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” the long value you're subtracting. it's literally the "how much are we taking off?" number. πŸ’Έ
  • v β€” a pointer to atomic_long_t. main character energy, fr fr. 🫢

πŸ’– DESCRIPTION πŸ’–

okay so this one atomically updates v to (v - i) with full ordering. no cap, that's the whole vibe. ✨

it's safe to use in noinstr code. but outside of noinstr land, prefer atomic_long_sub_return instead β€” that's the recommended pick. πŸ’…

🫢 RETURN 🫢

returns the updated value of v β€” the fresh new number after the subtract. πŸŽ€

πŸ‘€ SEE ALSO πŸ‘€

kernel file: ./include/linux/atomic/atomic-long.h

the whole atomic-long extended universe, fr fr:

mwah πŸ’‹ β€” source/version: ./include/linux/atomic, date: October 2026, and this is the raw_atomic_long_sub_return(9) page. byeee bestie πŸŽ€βœ¨

πŸ“¦ where this page comes from