* 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 */
}
* 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 */
}
if (wait_loops++ == KICK_READER_LOOPS) {
force_mb_single_thread(index->tid);
wait_loops = 0;
+ } else {
+ cpu_relax();
}
}
}