srcu_dereference_check(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… srcu_dereference_check(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual entry for srcu_dereference_check(9) β€” the little function with main character energy that fetches an SRCU-protected pointer so you can dereference it later. No cap, this is the one. πŸ’–


✨ NAME ✨

srcu_dereference_check β€” fetch SRCU-protected pointer for later dereferencing. Literally that. πŸ¦‹

πŸ’– SYNOPSIS πŸ’–

srcu_dereference_check (p , ssp , c );

πŸŽ€ ARGUMENTS πŸŽ€

  • p β€” the pointer to fetch and protect for later dereferencing. It's giving β€œhold this for me, bestie”. 🫢
  • ssp β€” pointer to the srcu_struct, which is used to check that we really are in an SRCU read-side critical section. Lowkey the vibe check for your locking. πŸ”₯
  • c β€” condition to check for update-side use. Yes bestie, this is the condition. πŸ’…

🌸 DESCRIPTION 🌸

If PROVE_RCU is enabled, invoking this outside of an RCU read-side critical section will result in an RCU-lockdep splat, unless c evaluates to 1. Not me getting yelled at by lockdep 😭. The c argument will normally be a logical expression containing lockdep_is_held calls. So like, that's the receipts. 🧚

🌈 SEE ALSO 🌈

The kernel file ./include/linux/srcu.h is where it lives, and these are the whole friend group β€” go say hi:


okay bye bestie πŸ’– this page came from ./include/linux, dated October 2026, and it's serving srcu_dereference_check(9) realness. go dereference responsibly, periodt. πŸŽ€

πŸ“¦ where this page comes from