X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_urcu_bp.c;h=f475fa6bd574ada9bf2013f805b9a222a5f76058;hb=98bc124a1949657d6af385f8b257af3a58957e51;hp=e8318241cc62e1c4d574834ee95b719c05ca8c17;hpb=5481ddb381061bda64aebc039900d21cac6a6caf;p=urcu.git diff --git a/tests/test_urcu_bp.c b/tests/test_urcu_bp.c index e831824..f475fa6 100644 --- a/tests/test_urcu_bp.c +++ b/tests/test_urcu_bp.c @@ -83,7 +83,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; @@ -396,7 +396,7 @@ int main(int argc, char **argv) printf_verbose("thread %-6s, thread id : %lx, tid %lu\n", "main", pthread_self(), (unsigned long)gettid()); - test_array = malloc(sizeof(*test_array) * ARRAY_SIZE); + test_array = calloc(1, sizeof(*test_array) * ARRAY_SIZE); tid_reader = malloc(sizeof(*tid_reader) * nr_readers); tid_writer = malloc(sizeof(*tid_writer) * nr_writers); count_reader = malloc(sizeof(*count_reader) * nr_readers);