/* Counts the new reader in the appropriate per-CPU element of the srcu_struct. Must be called from process context. Returns an index that must be passed to the matching srcu_read_unlock().  */
int srcu_read_lock(struct srcu_struct *sp)
/* Counts the new reader in the appropriate per-CPU element of the srcu_struct. Must be called from process context. Returns an index that must be passed to the matching srcu_read_unlock().  */
int srcu_read_lock(struct srcu_struct *sp)
{
	int idx;
	preempt_disable();
	idx = sp->completed & 0x1;
	barrier();
	per_cpu_ptr(sp->per_cpu_ref, smp_processor_id())->c[idx]++;
	srcu_barrier();
	preempt_enable();
	return idx;
}