X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_gc.c;h=d0f7e6e8e3f2466269c295b3394eb08fa16a4d37;hb=376ba488819af938e059e45315913c2ff5ce2b50;hp=2c944a5c41c613fedf327d9a4b6ee3c85bc049ce;hpb=6982d6d71aeed16d2d929bd0ed221e8f444b706e;p=urcu.git diff --git a/tests/test_urcu_gc.c b/tests/test_urcu_gc.c index 2c944a5..d0f7e6e 100644 --- a/tests/test_urcu_gc.c +++ b/tests/test_urcu_gc.c @@ -92,7 +92,7 @@ static unsigned long wduration; static inline void loop_sleep(unsigned long l) { while(l-- != 0) - cpu_relax(); + caa_cpu_relax(); } static int verbose_mode; @@ -164,7 +164,7 @@ static unsigned long long __thread nr_writes; static unsigned long long __thread nr_reads; static -unsigned long long __attribute__((aligned(CACHE_LINE_SIZE))) *tot_nr_writes; +unsigned long long __attribute__((aligned(CAA_CACHE_LINE_SIZE))) *tot_nr_writes; static unsigned int nr_readers; static unsigned int nr_writers; @@ -207,7 +207,7 @@ void *thr_reader(void *_count) while (!test_go) { } - smp_mb(); + cmm_smp_mb(); for (;;) { rcu_read_lock(); @@ -280,7 +280,7 @@ void *thr_writer(void *data) while (!test_go) { } - smp_mb(); + cmm_smp_mb(); for (;;) { #ifndef TEST_LOCAL_GC @@ -419,9 +419,9 @@ int main(int argc, char **argv) tot_nr_writes = malloc(sizeof(*tot_nr_writes) * nr_writers); pending_reclaims = malloc(sizeof(*pending_reclaims) * nr_writers); if (reclaim_batch * sizeof(*pending_reclaims[i].queue) - < CACHE_LINE_SIZE) + < CAA_CACHE_LINE_SIZE) for (i = 0; i < nr_writers; i++) - pending_reclaims[i].queue = calloc(1, CACHE_LINE_SIZE); + pending_reclaims[i].queue = calloc(1, CAA_CACHE_LINE_SIZE); else for (i = 0; i < nr_writers; i++) pending_reclaims[i].queue = calloc(reclaim_batch, @@ -444,7 +444,7 @@ int main(int argc, char **argv) exit(1); } - smp_mb(); + cmm_smp_mb(); test_go = 1;