srcu_readers_active(9)
β¨ 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β whichsrcu_structwe're counting active readers on, i.e. the ones holdingsrcu_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
- 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