raw_atomic6...turn_acquire(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… raw_atomic6...turn_acquire(9) πŸ’…

okay so this is a page from the Kernel API Manual, and the actual function living here is raw_atomic64_sub_return_acquire ✨. The title above is doing a little truncated moment, but we're moving with it πŸ’–.

🌸 NAME 🌸

raw_atomic64_sub_return_acquire β€” atomic subtract with acquire ordering

✨ SYNOPSIS ✨

s64 raw_atomic64_sub_return_acquire (s64 i , atomic64_t *v );

πŸŽ€ ARGUMENTS πŸŽ€

  • i β€” the s64 value to subtract. That's the amount coming off, bestie.
  • v β€” pointer to atomic64_t. This is the atomic thing getting updated.

πŸ¦‹ DESCRIPTION πŸ¦‹

Atomically updates v to (v - i) with acquire ordering. So it does the subtract and the ordering thing together, no cap πŸ’«.

Safe to use in noinstr code; prefer atomic64_sub_return_acquire elsewhere. Like, the raw one is allowed in noinstr, but outside that the manual is telling you to reach for atomic64_sub_return_acquire 🫢.

πŸ”₯ RETURN πŸ”₯

The updated value of v β€” that's the new value after the subtract πŸ’–.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file: ./include/linux/atomic/atomic-arch-fallback.h β€” that's the spot πŸŽ€.

The whole atomic extended family is linked too, fr fr:

source/version: ./include/linux/atomic Β· October 2026 β€” bye bestie, go be atomic πŸ’–βœ¨

πŸ“¦ where this page comes from