- if ((!list_empty(&RCU_curlist(cpu)) &&
- rcu_batch_before(RCU_batch(cpu), rcu_ctrlblk.curbatch)) ||
- (list_empty(&RCU_curlist(cpu)) &&
- !list_empty(&RCU_nxtlist(cpu))) ||
- cpu_isset(cpu, rcu_ctrlblk.rcu_cpu_mask))
+ /* This cpu has pending rcu entries and the grace period
+ * for them has completed.
+ */
+ if (RCU_curlist(cpu) &&
+ !rcu_batch_before(rcu_ctrlblk.completed,RCU_batch(cpu)))
+ return 1;
+
+ /* This cpu has no pending entries, but there are new entries */
+ if (!RCU_curlist(cpu) && RCU_nxtlist(cpu))
+ return 1;
+
+ /* The rcu core waits for a quiescent state from the cpu */
+ if (RCU_quiescbatch(cpu) != rcu_ctrlblk.cur || RCU_qs_pending(cpu))