X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=tests%2Ftest_qsbr.c;h=99da27c6a97564c5c015ee34b08174cd99ccde28;hb=f48d08555a6ba4f690e80d40b1a2f178a3a1a27e;hp=4f19c72aa3c7d0bdb292d55a3525f0fcea458077;hpb=5481ddb381061bda64aebc039900d21cac6a6caf;p=urcu.git diff --git a/tests/test_qsbr.c b/tests/test_qsbr.c index 4f19c72..99da27c 100644 --- a/tests/test_qsbr.c +++ b/tests/test_qsbr.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; @@ -403,7 +403,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);