X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=urcu.c;h=0241d3b652d14526c7217260daa596735689154b;hb=aa46e09faad0962ef1b782c0e564d8d674d51160;hp=d6dec1afa288a38c3faf523947ae4f9f7b9150ef;hpb=9340c38dbff1b407f35008f7f585a238fbd4de1c;p=userspace-rcu.git diff --git a/urcu.c b/urcu.c index d6dec1a..0241d3b 100644 --- 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) {