raw_atomic64_inc(9)
π raw_atomic64_inc π
okay so real talk, this one's straight out of the Kernel API Manual, and it's like... the smallest little guy with the biggest job? bestie, it bumps a 64-bit atomic counter by one and does not make a whole thing of it. relaxed ordering, no drama, no extra memory-barrier theater. we love a low-maintenance icon. π
β¨ NAME β¨
raw_atomic64_inc β atomic increment with relaxed ordering π
πΈ SYNOPSIS πΈ
void raw_atomic64_inc (atomic64_t *v );
π¦ ARGUMENTS π¦
vβ pointer toatomic64_t. yeah. that's the whole argument list. she's got one (1) parameter and she's thriving. π«Ά
π₯ DESCRIPTION π₯
Atomically updates v to (v + 1) with relaxed ordering. so like, the increment totally happens as one atomic little moment, but nobody's out here ordering it around your other memory ops β relaxed means relaxed, no cap. π§ββοΈ
π important bestie note: this one is safe to use innoinstrcode. but preferatomic64_incelsewhere βraw_atomic64_incis the specialist you call when you're in the no-instrumentation zone, not your everyday default. iykyk.
β RETURN β
Nothing. void. she returns to the void and the void is fine with it. π³οΈβ¨
π SEE ALSO π
okay so first things first, the source of truth lives right here in the kernel tree:
./include/linux/atomic/atomic-arch-fallback.h
and now... the family reunion π there are so many of them and i'm obsessed with every single one. 32-bit girlies first, then the 64-bit royalty.
π the raw_atomic_* crew (32-bit)
π read & set
π add
raw_atomic_add(9)raw_atomic_add_return(9)raw_atomic_add_return_acquire(9)raw_atomic_add_return_release(9)raw_atomic_add_return_relaxed(9)raw_atomic_fetch_add(9)raw_atomic_fetch_add_acquire(9)raw_atomic_fetch_add_release(9)raw_atomic_fetch_add_relaxed(9)
π sub
raw_atomic_sub(9)raw_atomic_sub_return(9)raw_atomic_sub_return_acquire(9)raw_atomic_sub_return_release(9)raw_atomic_sub_return_relaxed(9)raw_atomic_fetch_sub(9)raw_atomic_fetch_sub_acquire(9)raw_atomic_fetch_sub_release(9)raw_atomic_fetch_sub_relaxed(9)
π inc
raw_atomic_inc(9)raw_atomic_inc_return(9)raw_atomic_inc_return_acquire(9)raw_atomic_inc_return_release(9)raw_atomic_inc_return_relaxed(9)raw_atomic_fetch_inc(9)raw_atomic_fetch_inc_acquire(9)raw_atomic_fetch_inc_release(9)raw_atomic_fetch_inc_relaxed(9)
π dec
raw_atomic_dec(9)raw_atomic_dec_return(9)raw_atomic_dec_return_acquire(9)raw_atomic_dec_return_release(9)raw_atomic_dec_return_relaxed(9)raw_atomic_fetch_dec(9)raw_atomic_fetch_dec_acquire(9)raw_atomic_fetch_dec_release(9)raw_atomic_fetch_dec_relaxed(9)
π the bitwise girlies (and / andnot / or / xor)
raw_atomic_and(9)raw_atomic_fetch_and(9)raw_atomic_fetch_and_acquire(9)raw_atomic_fetch_and_release(9)raw_atomic_fetch_and_relaxed(9)raw_atomic_andnot(9)raw_atomic_fetch_andnot(9)raw_atomic_fetch_andnot_acquire(9)raw_atomic_fetch_andnot_release(9)raw_atomic_fetch_andnot_relaxed(9)raw_atomic_or(9)raw_atomic_fetch_or(9)raw_atomic_fetch_or_acquire(9)raw_atomic_fetch_or_release(9)raw_atomic_fetch_or_relaxed(9)raw_atomic_xor(9)raw_atomic_fetch_xor(9)raw_atomic_fetch_xor_acquire(9)raw_atomic_fetch_xor_release(9)raw_atomic_fetch_xor_relaxed(9)
π exchange & compare-and-swap court
raw_atomic_xchg(9)raw_atomic_xchg_acquire(9)raw_atomic_xchg_release(9)raw_atomic_xchg_relaxed(9)raw_atomic_cmpxchg(9)raw_atomic_cmpxchg_acquire(9)raw_atomic_cmpxchg_release(9)raw_atomic_cmpxchg_relaxed(9)raw_atomic_try_cmpxchg(9)raw_atomic_try_cmpxchg_acquire(9)raw_atomic_try_cmpxchg_release(9)raw_atomic_try_cmpxchg_relaxed(9)
π tests, negatives & unless-es
raw_atomic_sub_and_test(9)raw_atomic_dec_and_test(9)raw_atomic_inc_and_test(9)raw_atomic_add_negative(9)raw_atomic_add_negative_acquire(9)raw_atomic_add_negative_release(9)raw_atomic_add_negative_relaxed(9)raw_atomic_fetch_add_unless(9)raw_atomic_add_unless(9)raw_atomic_inc_not_zero(9)raw_atomic_inc_unless_negative(9)raw_atomic_dec_unless_positive(9)raw_atomic_dec_if_positive(9)
π the raw_atomic64_* crew (64-bit β yes, our people)
π read & set
π add
raw_atomic64_add(9)raw_atomic64_add_return(9)raw_atomic64_add_return_acquire(9)raw_atomic64_add_return_release(9)raw_atomic64_add_return_relaxed(9)raw_atomic64_fetch_add(9)raw_atomic64_fetch_add_acquire(9)raw_atomic64_fetch_add_release(9)raw_atomic64_fetch_add_relaxed(9)
π sub
raw_atomic64_sub(9)raw_atomic64_sub_return(9)raw_atomic64_sub_return_acquire(9)raw_atomic64_sub_return_release(9)raw_atomic64_sub_return_relaxed(9)raw_atomic64_fetch_sub(9)raw_atomic64_fetch_sub_acquire(9)raw_atomic64_fetch_sub_release(9)raw_atomic64_fetch_sub_relaxed(9)
π inc β and notice who's not in her own SEE ALSO list π (it's this page. main character behavior)
raw_atomic64_inc_return(9)raw_atomic64_inc_return_acquire(9)raw_atomic64_inc_return_release(9)raw_atomic64_inc_return_relaxed(9)raw_atomic64_fetch_inc(9)raw_atomic64_fetch_inc_acquire(9)raw_atomic64_fetch_inc_release(9)raw_atomic64_fetch_inc_relaxed(9)
π dec
raw_atomic64_dec(9)raw_atomic64_dec_return(9)raw_atomic64_dec_return_acquire(9)raw_atomic64_dec_return_release(9)raw_atomic64_dec_return_relaxed(9)raw_atomic64_fetch_dec(9)raw_atomic64_fetch_dec_acquire(9)raw_atomic64_fetch_dec_release(9)raw_atomic64_fetch_dec_relaxed(9)
π the bitwise girlies, 64-bit edition
raw_atomic64_and(9)raw_atomic64_fetch_and(9)raw_atomic64_fetch_and_acquire(9)raw_atomic64_fetch_and_release(9)raw_atomic64_fetch_and_relaxed(9)raw_atomic64_andnot(9)raw_atomic64_fetch_andnot(9)raw_atomic64_fetch_andnot_acquire(9)raw_atomic64_fetch_andnot_release(9)raw_atomic64_fetch_andnot_relaxed(9)raw_atomic64_or(9)raw_atomic64_fetch_or(9)raw_atomic64_fetch_or_acquire(9)raw_atomic64_fetch_or_release(9)raw_atomic64_fetch_or_relaxed(9)raw_atomic64_xor(9)raw_atomic64_fetch_xor(9)raw_atomic64_fetch_xor_acquire(9)raw_atomic64_fetch_xor_release(9)raw_atomic64_fetch_xor_relaxed(9)
π exchange & compare-and-swap, but bigger
raw_atomic64_xchg(9)raw_atomic64_xchg_acquire(9)raw_atomic64_xchg_release(9)raw_atomic64_xchg_relaxed(9)raw_atomic64_cmpxchg(9)raw_atomic64_cmpxchg_acquire(9)raw_atomic64_cmpxchg_release(9)raw_atomic64_cmpxchg_relaxed(9)raw_atomic64_try_cmpxchg(9)raw_atomic64_try_cmpxchg_acquire(9)raw_atomic64_try_cmpxchg_release(9)raw_atomic64_try_cmpxchg_relaxed(9)
π tests, negatives & unless-es, 64-bit flavor
raw_atomic64_sub_and_test(9)raw_atomic64_dec_and_test(9)raw_atomic64_inc_and_test(9)raw_atomic64_add_negative(9)raw_atomic64_add_negative_acquire(9)raw_atomic64_add_negative_release(9)raw_atomic64_add_negative_relaxed(9)raw_atomic64_fetch_add_unless(9)raw_atomic64_add_unless(9)raw_atomic64_inc_not_zero(9)raw_atomic64_inc_unless_negative(9)raw_atomic64_dec_unless_positive(9)raw_atomic64_dec_if_positive(9)
π«Ά friendly reminder bestie: that's the whole fam, nobody left behind. go read them, they're all (9) sections and they all ate. β¨
okay and finally, the little sign-off credits moment π¬ this page comes to you from the kernel source path ./include/linux/atomic, dated October 2026, and it's the man page for raw_atomic64_inc(9). mwah, go increment something atomically. πππ§
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms