srcu_readers_active(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ srcu_readers_active ✨

okay so bestie, welcome to the srcu_readers_active page from the Kernel API Manual πŸ’… this one is short and sweet and honestly kind of a baddie for a two-line function 🫢


🌸 NAME 🌸

srcu_readers_active β€” it returns true if there are readers, and false otherwise. that's it, that's the whole vibe check ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

bool srcu_readers_active (struct srcu_struct *ssp );

yes the space before the ) is canon, we don't touch it πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • ssp β€” which srcu_struct we're counting active readers on, i.e. the ones holding srcu_read_lock. like, this one specifically bestie, not some other struct, okay? 😭

πŸ”₯ DESCRIPTION πŸ”₯

so like. huge heads up before you go wild with this one πŸ‘‘

this is not an atomic primitive. ngl that's a real thing and it matters: if you invoke it on an active srcu_struct, it can suffer severe errors πŸ’€ no cap, severe. so please don't treat this like some casual little status check you sprinkle around at runtime, because it is absolutely not that.

that said!! it can be useful as an error check at cleanup time 🌸 that's the moment where it actually eats, iykyk. cleanup-time sanity check, iconic, no notes πŸŽ€

bestie reminder: not atomic β†’ don't call it on a live/active srcu_struct unless you enjoy severe errors. the glow-up here is cleanup only πŸ’…

🧚 SEE ALSO 🧚

  • Kernel file ./include/linux/srcutree.h πŸ‘€ go read it, it's giving lore

and that's the page!! πŸ’œ mwah, ily, go check your cleanup paths 🫢

sign-off: this lil beauty lives under ./include/linux, dated October 2026, and it's brought to you by the Kernel API Manual β€” srcu_readers_active(9) forever and ever, periodt β­πŸ“

πŸ“¦ where this page comes from