X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;ds=sidebyside;f=urcu.c;h=8cb32a117bb065405ca3f45e0224dfe8fbebbf5d;hb=8895e525a86e679e775b8267546799a0e7bc569f;hp=8cbdef9e66b386c0b6ac175b2029e194bfe3b43f;hpb=157dca953e2510afa1d16b929472c0f682531355;p=urcu.git diff --git a/urcu.c b/urcu.c index 8cbdef9..8cb32a1 100644 --- a/urcu.c +++ b/urcu.c @@ -105,7 +105,7 @@ static void force_mb_single_thread(pthread_t tid) * Wait for sighandler (and thus mb()) to execute on every thread. * BUSY-LOOP. */ - while (LOAD_REMOTE(sig_done) < 1) + while (LOAD_SHARED(sig_done) < 1) cpu_relax(); smp_mb(); /* read sig_done before ending the barrier */ } @@ -134,7 +134,7 @@ static void force_mb_all_threads(void) * Wait for sighandler (and thus mb()) to execute on every thread. * BUSY-LOOP. */ - while (LOAD_REMOTE(sig_done) < num_readers) + while (LOAD_SHARED(sig_done) < num_readers) cpu_relax(); smp_mb(); /* read sig_done before ending the barrier */ } @@ -159,6 +159,8 @@ void wait_for_quiescent_state(void) if (wait_loops++ == KICK_READER_LOOPS) { force_mb_single_thread(index->tid); wait_loops = 0; + } else { + cpu_relax(); } } }