Add missing pkgconfig files to Makefile.am
[urcu.git] / urcu.c
diff --git a/urcu.c b/urcu.c
index 5a9c2f0ae761d9a4d7cd97ed7af4bfc42998edb7..fa7499c20e649f232a841f5c5e7699b9eafad640 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -24,6 +24,7 @@
  */
 
 #define _BSD_SOURCE
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <pthread.h>
 #include <signal.h>
@@ -33,6 +34,8 @@
 #include <errno.h>
 #include <poll.h>
 
+#include "urcu-map.h"
+
 #include "urcu-static.h"
 /* Do not #define _LGPL_SOURCE to ensure we can emit the wrapper symbols */
 #include "urcu.h"
@@ -99,9 +102,9 @@ static void mutex_lock(pthread_mutex_t *mutex)
                        perror("Error in pthread mutex lock");
                        exit(-1);
                }
-               if (CAA_LOAD_SHARED(rcu_reader.need_mb)) {
+               if (CMM_LOAD_SHARED(rcu_reader.need_mb)) {
                        cmm_smp_mb();
-                       _CAA_STORE_SHARED(rcu_reader.need_mb, 0);
+                       _CMM_STORE_SHARED(rcu_reader.need_mb, 0);
                        cmm_smp_mb();
                }
                poll(NULL,0,10);
@@ -155,7 +158,7 @@ static void force_mb_all_readers(void)
         * cache flush is enforced.
         */
        cds_list_for_each_entry(index, &registry, node) {
-               CAA_STORE_SHARED(index->need_mb, 1);
+               CMM_STORE_SHARED(index->need_mb, 1);
                pthread_kill(index->tid, SIGRCU);
        }
        /*
@@ -172,7 +175,7 @@ static void force_mb_all_readers(void)
         * the Linux Test Project (LTP).
         */
        cds_list_for_each_entry(index, &registry, node) {
-               while (CAA_LOAD_SHARED(index->need_mb)) {
+               while (CMM_LOAD_SHARED(index->need_mb)) {
                        pthread_kill(index->tid, SIGRCU);
                        poll(NULL, 0, 1);
                }
@@ -205,7 +208,7 @@ void update_counter_and_wait(void)
        struct rcu_reader *index, *tmp;
 
        /* Switch parity: 0 -> 1, 1 -> 0 */
-       CAA_STORE_SHARED(rcu_gp_ctr, rcu_gp_ctr ^ RCU_GP_CTR_PHASE);
+       CMM_STORE_SHARED(rcu_gp_ctr, rcu_gp_ctr ^ RCU_GP_CTR_PHASE);
 
        /*
         * Must commit rcu_gp_ctr update to memory before waiting for quiescent
@@ -384,7 +387,7 @@ static void sigrcu_handler(int signo, siginfo_t *siginfo, void *context)
         * executed on.
         */
        cmm_smp_mb();
-       _CAA_STORE_SHARED(rcu_reader.need_mb, 0);
+       _CMM_STORE_SHARED(rcu_reader.need_mb, 0);
        cmm_smp_mb();
 }
 
@@ -428,4 +431,8 @@ void rcu_exit(void)
        assert(act.sa_sigaction == sigrcu_handler);
        assert(cds_list_empty(&registry));
 }
+
 #endif /* #ifdef RCU_SIGNAL */
+
+#include "urcu-call-rcu-impl.h"
+#include "urcu-defer-impl.h"
This page took 0.023853 seconds and 4 git commands to generate.