ATOMIC_LOAD_INT(9)
π ATOMIC_LOAD_INT(9) β atomic_load_int, atomic_load_long, atomic_store_int, atomic_store_long
okay bestie, welcome to the Kernel Developer's Manual page for ATOMIC_LOAD_INT(9) and its little friend group β¨ β these are the atomic read/write girlies and honestly? they ate.
π NAME
atomic_load_int, atomic_load_long, atomic_store_long, atomic_store_int β atomic read and write memory operations π
β¨ SYNOPSIS
#include <sys/atomic.h>
unsigned int
atomic_load_int(volatile const unsigned int *p);
unsigned long
atomic_load_long(volatile const unsigned long *p);
void
atomic_store_int(volatile unsigned int *p, unsigned int v);
void
atomic_store_long(volatile unsigned long *p, unsigned long v);
π¦ DESCRIPTION
so the atomic_load and atomic_store set of functions? they're literally the interface for atomically performing read or write memory operations β and when we say atomically we mean with respect to interrupts and multiple processors in the system. no cap, that's the whole vibe check they're passing. π₯
The atomic_store functions change the value referenced by the pointer p to the value v. that's it, that's the plot. π«Ά
πΈ CONTEXT
atomic_load_int(), atomic_load_long(), atomic_store_int(), and atomic_store_long() can all be called during autoconf, from process context, or from interrupt context. all four of them, every single time, iconic behavior tbh π
β RETURN VALUES
atomic_load_int and atomic_load_long return the value at p. simple as that, periodt π
π§ SEE ALSO
atomic_add_int(9)atomic_add_long(9)atomic_sub_int(9)atomic_sub_long(9)
go give the add/sub girlies some love too π
π HISTORY
The atomic_load and atomic_store functions first appeared in OpenBSD 7.1. a historic moment fr fr π
and that's the whole page bestie!! π this slay little number comes to you straight from the Debian edition, dated July 14, 2025, filed under ATOMIC_LOAD_INT(9) β mwah π go forth and be atomic β¨
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2014 David Gwynne <dlg@openbsd.org>
- Copyright (c) 2022 Alexander Bluhm <bluhm@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms