synchronize_srcu
Prev | Kernel utility functions | Next

## Name

synchronize_srcu — wait for prior SRCU read-side critical-section completion

## Synopsis

`void synchronize_srcu (` | struct srcu_struct * sp`)`;

## Arguments

`sp`

  srcu_struct with which to synchronize.

## Description

Wait for the count to drain to zero of both indexes. To avoid the possible starvation of `synchronize_srcu`, it waits for the count of the index=((->completed & 1) ^ 1) to drain to zero at first, and then flip the completed and wait for the count of the other index.

Can block; must be called from process context.

Note that it is illegal to call `synchronize_srcu` from the corresponding SRCU read-side critical section; doing so will result in deadlock. However, it is perfectly legal to call `synchronize_srcu` on one srcu_struct from some other srcu_struct's read-side critical section.

Prev | Up | Next
cleanup_srcu_struct | Home | synchronize_srcu_expedited