---
name: "cond_synchronize_rcu"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/cond_synchronize_rcu"
---

# cond\_synchronize\_rcu(9)

Conditionally wait for an RCU grace period

## NAME

cond\_synchronize\_rcu - Conditionally wait for an RCU grace period

## SYNOPSIS

**void cond\_synchronize\_rcu(unsigned long** *oldstate***);**

## ARGUMENTS

*oldstate*

return value from earlier call to **get\_state\_synchronize\_rcu**

## DESCRIPTION

If a full RCU grace period has elapsed since the earlier call to **get\_state\_synchronize\_rcu**, just return. Otherwise, invoke **synchronize\_rcu** 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
