same_state_synchronize_srcu(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… same_state_synchronize_srcu(9) β€” the Kernel API Manual, bestie edition ✨

okay so welcome to same_state_synchronize_srcu(9), a genuinely tiny little function in the Linux kernel API manual and honestly? she's iconic in her simplicity. this is her moment, let's get into it πŸŽ€


🌸 NAME 🌸

same_state_synchronize_srcu β€” literally just: are two old-state values identical? that's the whole vibe check πŸ’–


✨ SYNOPSIS ✨

bool same_state_synchronize_srcu (unsigned long oldstate1 , unsigned
long oldstate2 );

she takes two unsigned longs and hands you back a bool. no cap, that's it 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • oldstate1 β€” the first old-state value, bestie. first out of two 🌸
  • oldstate2 β€” and this one's the second old-state value πŸ’œ

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea β˜• β€” these two old-state values must have been obtained from one of these three:

  • get_state_synchronize_srcu
  • start_poll_synchronize_srcu
  • get_completed_synchronize_srcu

like, that's a hard requirement, not a suggestion, iykyk πŸ™ˆ

she returns true if the two values are identical and false otherwise. periodt. πŸ’…

and why do we care?? because this lets structures whose lifetimes are tracked by old-state values push those values to a list header β€” which means those structures can be slightly smaller. tiny struct, big slay πŸ‘‘ lowkey a main character optimization fr fr.


πŸ‘€ SEE ALSO πŸ‘€

Kernel file ./include/linux/srcu.h β€” go read it, she's right there 🧚

like, that's the whole srcu friend group right there β€” go say hi to all of them πŸ’–βœ¨


and that's the page, bestie!! πŸŽ€ this whole thing lives in <bold>./include/linux</bold> and it's dated October 2026 β€” so yeah, timestamped straight from the source, no cap. mwah, go read some kernel headers πŸ’‹πŸŒˆβ­

πŸ“¦ where this page comes from