'\" t .\" Title: cond_synchronize_sched .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Driver Basics .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "COND_SYNCHRONIZE_SCH" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Driver Basics" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" cond_synchronize_sched \- Conditionally wait for an RCU\-sched grace period .SH "SYNOPSIS" .HP \w'void\ cond_synchronize_sched('u .BI "void cond_synchronize_sched(unsigned\ long\ " "oldstate" ");" .SH "ARGUMENTS" .PP \fIoldstate\fR .RS 4 return value from earlier call to \fBget_state_synchronize_sched\fR .RE .SH "DESCRIPTION" .PP If a full RCU\-sched grace period has elapsed since the earlier call to \fBget_state_synchronize_sched\fR, just return\&. Otherwise, invoke \fBsynchronize_sched\fR to wait for a full grace period\&. .PP 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\&. .SH "COPYRIGHT" .br