atomic_long_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… atomic_long_read β€” the manual page, but make it make sense

okay so bestie, you opened atomic_long_read(9) from the Kernel API Manual and I'm here to translate. it's short, it's sweet, it's a whole one-function vibe. let's go 🫢


✨ NAME ✨

atomic_long_read β€” atomic load with relaxed ordering


πŸŽ€ SYNOPSIS πŸŽ€

long atomic_long_read (const atomic_long_t *v );

🌸 ARGUMENTS 🌸

  • v β€” pointer to atomic_long_t. that's the whole ask. you hand it a pointer to an atomic_long_t, it does its little atomic thing. no other params, no drama πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: it atomically loads the value of v with relaxed ordering. atomically = nobody catches it halfway through, it's a whole clean read, main character energy only. relaxed ordering = it does not come with extra memory-ordering barriers attached, it's just out here living its life.

⚠️ unsafe to use in noinstr code β€” and I mean it, bestie, do NOT. use raw_atomic_long_read there instead. fr fr, that's the rule. πŸ™ˆ

⭐ RETURN ⭐

the value loaded from v. that's it. that's the return value. you asked, it delivered. 🫢


πŸ”₯ SEE ALSO πŸ”₯

the kernel file this lives in is ./include/linux/atomic/atomic-instrumented.h, and honestly the related-functions list is giving entire cinematic universe, so buckle up. every single one, in order, because I would never leave a detail behind πŸ’–

and now, the atomic64 chapter of the universe, because of course there's a 64-bit one 🌈

and finally the atomic_long fam β€” the one you're literally here for, but also all its siblings πŸ‘‘


and that's the page!! πŸ’– it comes to you from ./include/linux/atomic, dated October 2026, and it will forever be known as atomic_long_read(9). slay, go read your atomics. mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from