userspace-rcu tests: zero array before using
[urcu.git] / tests / test_urcu.c
index eeea7f55e2253853323525ad94076a070390b14e..bbdb2d8f4ac33abe82aa23ce6a8844a2db179b89 100644 (file)
@@ -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;
@@ -400,7 +400,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);
This page took 0.023069 seconds and 4 git commands to generate.