}
#endif /* #ifdef HAS_INCOHERENT_CACHES */
-static void force_mb_all_threads(void)
-{
- smp_mb();
-}
-
static void wait_for_quiescent_state(void)
{
struct reader_registry *index;
* our own quiescent state. This allows using synchronize_rcu() in
* threads registered as readers.
*/
+ smp_mb();
if (was_online)
- _rcu_thread_offline();
+ STORE_SHARED(rcu_reader_qs_gp, 0);
- force_mb_all_threads();
internal_urcu_lock();
STORE_SHARED(urcu_gp_ctr, urcu_gp_ctr + 2);
wait_for_quiescent_state();
internal_urcu_unlock();
- force_mb_all_threads();
if (was_online)
- _rcu_thread_online();
+ _STORE_SHARED(rcu_reader_qs_gp, LOAD_SHARED(urcu_gp_ctr) + 1);
+ smp_mb();
}
/*