cond_synchro...cu_expedited(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

cond_synchro...cu_expedited(9) πŸ’…

okay so welcome to the Kernel API Manual corner, bestie β€” this one is short, sweet, and lowkey iconic ✨


🌸 NAME 🌸

cond_synchronize_rcu_expedited β€” conditionally wait for an expedited RCU grace period. That’s the whole vibe πŸŽ€


✨ SYNOPSIS ✨

void cond_synchronize_rcu_expedited (unsigned long oldstate );

πŸŽ€ ARGUMENTS πŸŽ€

  • oldstate β€” this is the value you got from get_state_synchronize_rcu, start_poll_synchronize_rcu, or start_poll_synchronize_rcu_expedited. It’s your little state ticket 🎟️✨

πŸ’… DESCRIPTION πŸ’…

okay so here’s the situation: if any type of full RCU grace period has already elapsed since that earlier call to get_state_synchronize_rcu, start_poll_synchronize_rcu, or start_poll_synchronize_rcu_expedited, then we literally just return. No extra waiting, no drama πŸ’–

Otherwise? We invoke synchronize_rcu_expedited to wait for a full grace period. That’s the move πŸ”₯

And yes, bestie, this function does not take counter wrap into account. But counter wrap is harmless β€” no cap. If the counter wraps, we have waited for more than 2 billion grace periods (and way more on a 64-bit system!), so waiting for a couple of additional grace periods should be just fine. Slay πŸ’€βœ¨

The memory-ordering guarantees? They are the same ones that would be provided by a synchronize_rcu that was invoked at the call to the function that provided oldstate and that returned at the end of this function. Iconic behavior, fr fr πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯


β€” xoxo, your Unix bestie, signing off from ./kernel/rcu in October 2026 as cond_synchro...cu_expedited(9) πŸ’–βœ¨

πŸ“¦ where this page comes from