table of contents
COND_SYNCHRONIZE_SCH(9) | Driver Basics | COND_SYNCHRONIZE_SCH(9) |
NAME¶
cond_synchronize_sched - Conditionally wait for an RCU-sched grace period
SYNOPSIS¶
void cond_synchronize_sched(unsigned long oldstate);
ARGUMENTS¶
oldstate
DESCRIPTION¶
If a full RCU-sched grace period has elapsed since the earlier call to get_state_synchronize_sched, just return. Otherwise, invoke synchronize_sched to wait for a full grace period.
Yes, this function does not take counter wrap into account. But counter wrap is harmless. 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 one additional grace period should be just fine.
COPYRIGHT¶
January 2017 | Kernel Hackers Manual 4.8. |