{
LIST_HEAD(qsreaders);
int wait_loops = 0;
- struct urcu_reader *index;
+ struct urcu_reader *index, *tmp;
if (list_empty(®istry))
return;
force_mb_all_threads();
}
- list_for_each_entry(index, ®istry, head) {
+ list_for_each_entry_safe(index, tmp, ®istry, head) {
if (!rcu_old_gp_ongoing(&index->ctr))
list_move(&index->head, &qsreaders);
}
#endif /* #else #ifndef HAS_INCOHERENT_CACHES */
}
/* put back the reader list in the registry */
- list_move(&qsreaders, ®istry);
+ list_splice(&qsreaders, ®istry);
}
void synchronize_rcu(void)