raw_atomic_...ess_positive(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual page for raw_atomic_...ess_positive(9) β€” yes, that's the abbreviated title, and the actual main character is raw_atomic_long_dec_unless_positive. it's giving atomic decrement unless positive, but with full ordering energy, and we're gonna get into it πŸ’…βœ¨

πŸ’– NAME πŸ’–

  • raw_atomic_long_dec_unless_positive β€” atomic decrement unless positive with full ordering.

🌸 SYNOPSIS 🌸

bool raw_atomic_long_dec_unless_positive (atomic_long_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • v β€” pointer to atomic_long_t.

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: if (v <= 0), this thing atomically updates v to (v - 1) with full ordering. if that condition is not true, v is not modified, and relaxed ordering is provided. no cap ✨

πŸ’€ technical caveat, bestie: it's safe to use in noinstr code. everywhere else, prefer atomic_long_dec_unless_positive. iykyk.

πŸ”₯ RETURN πŸ”₯

true if v was updated, false otherwise. simple, iconic, no notes πŸ‘‘

🌈 SEE ALSO 🌈

the kernel file is ./include/linux/atomic/atomic-long.h, and here's the full friend group β€” every single reference, no gatekeeping:


mwah πŸ’‹ this page was served from ./include/linux/atomic, dated October 2026, and it's the raw_atomic_...ess_positive(9) page. bye bestie, go be safe with your atomics πŸ«ΆπŸ§šπŸ’œ

πŸ“¦ where this page comes from