- if (unlikely(uatomic_read(&gp_futex) == -1)) {
- uatomic_set(&gp_futex, 0);
- futex_noasync(&gp_futex, FUTEX_WAKE, 1,
+ if (caa_unlikely(_CMM_LOAD_SHARED(URCU_TLS(rcu_reader).waiting))) {
+ _CMM_STORE_SHARED(URCU_TLS(rcu_reader).waiting, 0);
+ cmm_smp_mb();
+ if (uatomic_read(&rcu_gp_futex) != -1)
+ return;
+ uatomic_set(&rcu_gp_futex, 0);
+ futex_noasync(&rcu_gp_futex, FUTEX_WAKE, 1,