atomic_fetch_or_relaxed(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ atomic_fetch_or_relaxed(9) ✨

Kernel API Manual bestie, we are doing a relaxed bitwise OR and it is giving atomic icon energy πŸ’…πŸ¦‹


🌸 NAME 🌸

atomic_fetch_or_relaxed β€” atomic bitwise OR with relaxed ordering ✨

πŸŽ€ SYNOPSIS πŸŽ€

int atomic_fetch_or_relaxed (int i , atomic_t *v );

πŸ’– ARGUMENTS πŸ’–

  • i β€” int value
  • v β€” pointer to atomic_t

πŸ”₯ DESCRIPTION πŸ”₯

Atomically updates v to (v | i) with relaxed ordering. No cap, it is atomic, periodt πŸ’…

Safety check, bestie: it is unsafe to use in noinstr code β€” use raw_atomic_fetch_or_relaxed there instead. Do not play with that one πŸ™ˆ

πŸ‘‘ RETURN πŸ‘‘

The original value of v β€” yes, the OG value from before the OR, she returns it πŸ’–

πŸ’œ SEE ALSO πŸ’œ

Kernel file: ./include/linux/atomic/atomic-instrumented.h β€” that is the file, iykyk 🌈

The whole atomic-ops bestie group chat, in original order:


Source/version: ./include/linux/atomic Β· date: October 2026 β€” and that is the whole atomic_fetch_or_relaxed(9) page, bestie. Go atomically OR something with relaxed ordering and text me back πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from