#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#include <poll.h>
#include "urcu.h"
}
#ifdef DEBUG_FULL_MB
+#ifdef HAS_INCOHERENT_CACHES
static void force_mb_single_thread(struct reader_registry *index)
{
smp_mb();
}
+#endif /* #ifdef HAS_INCOHERENT_CACHES */
static void force_mb_all_threads(void)
{
smp_mb();
}
-#else
-
+#else /* #ifdef DEBUG_FULL_MB */
+#ifdef HAS_INCOHERENT_CACHES
static void force_mb_single_thread(struct reader_registry *index)
{
assert(registry);
}
smp_mb(); /* read ->need_mb before ending the barrier */
}
+#endif /* #ifdef HAS_INCOHERENT_CACHES */
static void force_mb_all_threads(void)
{
}
smp_mb(); /* read ->need_mb before ending the barrier */
}
-#endif
+#endif /* #else #ifdef DEBUG_FULL_MB */
void wait_for_quiescent_state(void)
{
* Wait for each thread urcu_active_readers count to become 0.
*/
for (index = registry; index < registry + num_readers; index++) {
+#ifndef HAS_INCOHERENT_CACHES
+ while (rcu_old_gp_ongoing(index->urcu_active_readers))
+ cpu_relax();
+#else /* #ifndef HAS_INCOHERENT_CACHES */
int wait_loops = 0;
/*
* BUSY-LOOP. Force the reader thread to commit its
cpu_relax();
}
}
+#endif /* #else #ifndef HAS_INCOHERENT_CACHES */
}
}
assert(act.sa_sigaction == sigurcu_handler);
free(registry);
}
-#endif
+#endif /* #ifndef DEBUG_FULL_MB */