init_srcu_struct_generic(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… init_srcu_struct_generic(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're deep in the kernel, it's giving Kernel API Manual energy, and you need a sleep-RCU struct that's not static. Yeah. This is the page for you. 🫢


✨ NAME ✨

init_srcu_struct_generic β€” initialize a sleep-RCU structure 🌸


✨ SYNOPSIS ✨

int init_srcu_struct_generic (struct srcu_struct *ssp );

✨ ARGUMENTS ✨

  • ssp β€” the structure to initialize. that's her. that's the one you're setting up πŸ’–

✨ DESCRIPTION ✨

So here's the tea πŸ“: use this in place of DEFINE_SRCU and DEFINE_STATIC_SRCU for non-static srcu_struct structures β€” the ones that are gonna get passed to srcu_read_lock, srcu_read_lock_nmisafe, and friends. iykyk.

And like, it is necessary to invoke this on a given srcu_struct before passing that srcu_struct to any other function. no cap. not optional. do it first, bestie, or the vibe check fails 😭

Each srcu_struct represents a separate domain of SRCU protection ✨ β€” so every one of them is living its own main character life, fully independent. πŸ‘‘


✨ SEE ALSO ✨


and that's the whole page, periodt πŸ’… this little icon came out of ./kernel/rcu, dated October 2026, and it's filed under init_srcu_struct_generic(9) β€” go slay your SRCU setup, bestie βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from