atomic_cmpxchg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ atomic_cmpxchg(9) β€” Kernel API Manual ✨

okay so bestie, welcome to the atomic_cmpxchg(9) page from the Kernel API Manual πŸ’… this one is literally about an atomic compare and exchange, and we’re gonna keep every single deet. no cap.


🌸 NAME 🌸

atomic_cmpxchg β€” Atomic compare and exchange

πŸ¦‹ SYNOPSIS πŸ¦‹

int atomic_cmpxchg (atomic_t *addr , int oldval , int newval );

πŸŽ€ ARGUMENTS πŸŽ€

  • addr β€” -- undescribed -- 😭 the manpage is literally not giving us anything else for this one, so that’s the whole description we got.
  • oldval β€” the expected value of the futex ✨
  • newval β€” the new value to try and assign the futex 🫢

πŸ’– DESCRIPTION πŸ’–

Return the old value of addr->val. periodt πŸ’… that’s the description, short and iconic.

πŸ”₯ SEE ALSO πŸ”₯


mwah πŸ’‹ this cutie comes from source/version ./tools/testing/selftests/fute..., dated October 2026, page atomic_cmpxchg(9) 🫢✨

πŸ“¦ where this page comes from