*/
#define _BSD_SOURCE
+#define _GNU_SOURCE
#include <stdio.h>
#include <pthread.h>
#include <signal.h>
#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"
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);
* cache flush is enforced.
*/
cds_list_for_each_entry(index, ®istry, node) {
- CAA_STORE_SHARED(index->need_mb, 1);
+ CMM_STORE_SHARED(index->need_mb, 1);
pthread_kill(index->tid, SIGRCU);
}
/*
* the Linux Test Project (LTP).
*/
cds_list_for_each_entry(index, ®istry, node) {
- while (CAA_LOAD_SHARED(index->need_mb)) {
+ while (CMM_LOAD_SHARED(index->need_mb)) {
pthread_kill(index->tid, SIGRCU);
poll(NULL, 0, 1);
}
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
* executed on.
*/
cmm_smp_mb();
- _CAA_STORE_SHARED(rcu_reader.need_mb, 0);
+ _CMM_STORE_SHARED(rcu_reader.need_mb, 0);
cmm_smp_mb();
}
assert(act.sa_sigaction == sigrcu_handler);
assert(cds_list_empty(®istry));
}
+
#endif /* #ifdef RCU_SIGNAL */
+
+#include "urcu-call-rcu-impl.h"
+#include "urcu-defer-impl.h"