D.1.3.1 Data Structures

SRCU's data structures are shown in Figure [*], and are depicted schematically in Figure [*]. The completed field is a count of the number of grace periods since the struct srcu was initialized, and as shown in the diagram, its low-order bit is used to index the struct srcu_struct_array. The per_cpu_ref field points to the array, and the mutex field is used to permit but one synchronize_srcu() at a time to proceed.

Figure: SRCU Data Structures
\begin{figure}{ \scriptsize
\begin{verbatim}1 int srcu_readers_active_idx(str...
...p->per_cpu_ref);
28 sp->per_cpu_ref = NULL;
29 }\end{verbatim}
}\end{figure}

Figure: SRCU Data-Structure Diagram
\includegraphics{appendix/rcuimpl/srcuds}



Paul E. McKenney 2011-02-12