raw_atomic_l...h_or_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic_l...h_or_acquire(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so this one is raw_atomic_long_fetch_or_acquire, and yes the title is truncated with an ellipsis like a text message from someone who hit send too early 😭 but she's real and she's iconic. Let's get into it.


✨ NAME ✨

raw_atomic_long_fetch_or_acquire β€” atomic bitwise OR, but make it acquire ordered πŸ’…


🌸 SYNOPSIS 🌸

long raw_atomic_long_fetch_or_acquire (long i , atomic_long_t *v );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • i β€” a long value. yeah. just a long. that's the whole vibe.
  • v β€” pointer to atomic_long_t. this is the girl being OR'd, respectfully.

πŸ’– DESCRIPTION πŸ’–

Atomically updates v to (v | i) with acquire ordering. so it flips all the bits it needs to flip, all at once, no half-finished nonsense, and the acquire ordering means the memory ordering is handled properly too πŸ‘‘

Safe to use in noinstr code; prefer atomic_long_fetch_or_acquire elsewhere.

🚨 real talk: that's not a suggestion, it's a whole preference. Inside noinstr code, use this one. Everywhere else? Use atomic_long_fetch_or_acquire. The manpage said "prefer," and we listen to the manpage.

πŸ”₯ RETURN πŸ”₯

The original value of v. not the new one. the before picture, not the after. literal main character energy: she remembers you how you were πŸ’€βœ¨


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/linux/atomic/atomic-long.h

and literally the entire atomic_long extended universe, no cap, here's the whole friend group 🫢:


πŸ“ that's the whole page, bestie β€” no skips, no shortcuts πŸ“

This one lives in ./include/linux/atomic and it's dated October 2026, so mark your calendars, mwah πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from