cond_synchro...cu_expedited(9)
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 fromget_state_synchronize_rcu,start_poll_synchronize_rcu, orstart_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 π₯
- Kernel file
./kernel/rcu/tree_exp.h:synchronize_rcu_expedited(9),start_poll_synchronize_rcu_expedited(9),start_poll_synchronize_rcu_expedited_full(9),cond_synchronize_rcu_expedited_full(9)π¦
β xoxo, your Unix bestie, signing off from ./kernel/rcu in October 2026 as cond_synchro...cu_expedited(9) πβ¨
π¦ 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