waitqueue: add in_waitqueue field
[userspace-rcu.git] / urcu.c
diff --git a/urcu.c b/urcu.c
index d6dec1afa288a38c3faf523947ae4f9f7b9150ef..0241d3b652d14526c7217260daa596735689154b 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -41,9 +41,9 @@
 #include "urcu/static/urcu.h"
 #include "urcu-pointer.h"
 #include "urcu/tls-compat.h"
+#include "urcu/waitqueue-lifo.h"
 
 #include "urcu-die.h"
-#include "urcu-wait.h"
 
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #undef _LGPL_SOURCE
@@ -242,12 +242,12 @@ static void wait_for_readers(struct cds_list_head *input_readers,
         * rcu_gp.ctr value.
         */
        for (;;) {
+               if (wait_loops < RCU_QS_ACTIVE_ATTEMPTS)
+                       wait_loops++;
                if (wait_loops >= RCU_QS_ACTIVE_ATTEMPTS) {
                        uatomic_dec(&rcu_gp.futex);
                        /* Write futex before read reader_gp */
                        smp_mb_master(RCU_MB_GROUP);
-               } else {
-                       wait_loops++;
                }
 
                cds_list_for_each_entry_safe(index, tmp, input_readers, node) {
This page took 0.02307 seconds and 4 git commands to generate.