kcsan_atomic_next(9)
π kcsan_atomic_next(9) β a Kernel API Manual moment
okay so welcome to the Kernel API Manual, bestie β today's episode is kcsan_atomic_next(9) and it's honestly such a little function with such a big "trust me bro, these next few accesses are atomic" energy β¨
πΈ NAME
kcsan_atomic_next β consider following accesses as atomic π
π¦ SYNOPSIS
void kcsan_atomic_next (int n );
π ARGUMENTS
nβ the number of following memory accesses to treat as atomic. that's it, that's the whole parameter, no cap π«Ά
π₯ DESCRIPTION
Force treating the next n memory accesses for the current context as atomic operations. literally just that β you point at how many accesses are coming and KCSAN goes "say less, they're atomic now" π
β¨
ngl this is a force, so it's doing exactly what you told it to. it's not vibing, it's obeying π
π SEE ALSO
Kernel file ./include/linux/kcsan-checks.h β the main character file, go read it fr fr π
__kcsan_check_access(9)__kcsan_mb(9)__kcsan_wmb(9)__kcsan_rmb(9)__kcsan_release(9)kcsan_disable_current(9)kcsan_enable_current(9)kcsan_nestable_atomic_begin(9)kcsan_nestable_atomic_end(9)kcsan_flat_atomic_begin(9)kcsan_flat_atomic_end(9)kcsan_set_access_mask(9)kcsan_begin_scoped_access(9)kcsan_end_scoped_access(9)__kcsan_check_read(9)__kcsan_check_write(9)__kcsan_check_read_write(9)kcsan_check_read(9)kcsan_check_write(9)kcsan_check_read_write(9)ASSERT_EXCLUSIVE_WRITER(9)ASSERT_EXCLUSIVE_WRITER_SCOPED(9)ASSERT_EXCLUSIVE_ACCESS(9)ASSERT_EXCLUSIVE_ACCESS_SCOPED(9)ASSERT_EXCLUSIVE_BITS(9)
like, the whole friend group showed up for this one ππ
mwah π that's the page! sign-off time: this lil legend lives in ./include/linux, it's dated October 2026, and it answers to the name kcsan_atomic_next(9) β slay, periodt, go treat those accesses as atomic ππ¦π
π¦ 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