X-Git-Url: https://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_gc.c;h=4eaa61b777d0dd6460b4f0ae196bb5ca0d833c28;hp=ddafb871536ff1b76f1c69a703f4852a9bb38509;hb=9d2614f07691a813a3c560a6c0bcd0a7be854ed5;hpb=5481ddb381061bda64aebc039900d21cac6a6caf diff --git a/tests/test_urcu_gc.c b/tests/test_urcu_gc.c index ddafb87..4eaa61b 100644 --- a/tests/test_urcu_gc.c +++ b/tests/test_urcu_gc.c @@ -31,12 +31,15 @@ #include #include #include -#include #include #include #include +#ifdef __linux__ +#include +#endif + /* hardcoded number of CPUs */ #define NR_CPUS 16384 @@ -92,7 +95,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 +167,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; @@ -419,9 +422,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,