-#ifdef RCU_SIGNAL
-static void force_mb_all_readers(void)
-{
- struct rcu_reader *index;
-
- /*
- * Ask for each threads to execute a cmm_smp_mb() so we can consider the
- * compiler barriers around rcu read lock as real memory barriers.
- */
- if (cds_list_empty(®istry))
- return;
- /*
- * pthread_kill has a cmm_smp_mb(). But beware, we assume it performs
- * a cache flush on architectures with non-coherent cache. Let's play
- * safe and don't assume anything : we use cmm_smp_mc() to make sure the
- * cache flush is enforced.
- */
- cds_list_for_each_entry(index, ®istry, node) {
- CMM_STORE_SHARED(index->need_mb, 1);
- pthread_kill(index->tid, SIGRCU);
- }
- /*
- * Wait for sighandler (and thus mb()) to execute on every thread.
- *
- * Note that the pthread_kill() will never be executed on systems
- * that correctly deliver signals in a timely manner. However, it
- * is not uncommon for kernels to have bugs that can result in
- * lost or unduly delayed signals.
- *
- * If you are seeing the below pthread_kill() executing much at
- * all, we suggest testing the underlying kernel and filing the
- * relevant bug report. For Linux kernels, we recommend getting
- * the Linux Test Project (LTP).
- */
- cds_list_for_each_entry(index, ®istry, node) {
- while (CMM_LOAD_SHARED(index->need_mb)) {
- pthread_kill(index->tid, SIGRCU);
- (void) poll(NULL, 0, 1);
- }
- }
- cmm_smp_mb(); /* read ->need_mb before ending the barrier */
-}
-
-static void smp_mb_master(void)
-{
- force_mb_all_readers();
-}
-#endif /* #ifdef RCU_SIGNAL */
-