Allow tests to run on architectures without per-cpu call_rcu support
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 4 Mar 2012 20:50:07 +0000 (15:50 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sun, 4 Mar 2012 20:50:07 +0000 (15:50 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/test_urcu_hash.c
tests/test_urcu_lfq.c
tests/test_urcu_lfs.c

index c8d8a89b411c4679b1e042f329571e2497f96aeb..aac1db88cbc2a09425d87f3ef12adf6e54423161 100644 (file)
@@ -1015,7 +1015,9 @@ int main(int argc, char **argv)
        count_writer = malloc(sizeof(*count_writer) * nr_writers);
 
        err = create_all_cpu_call_rcu_data(0);
-        assert(!err);
+       if (err) {
+               printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n");
+       }
 
        if (memory_backend) {
                test_ht = _cds_lfht_new(init_hash_size, min_hash_alloc_size,
index 11e7eb37b265c43a404d26c1d017e58cbfbc9fb1..01a2781530741de5fa944959f00e98ddf2ec6dda 100644 (file)
@@ -381,7 +381,9 @@ int main(int argc, char **argv)
        count_dequeuer = malloc(2 * sizeof(*count_dequeuer) * nr_dequeuers);
        cds_lfq_init_rcu(&q, call_rcu);
        err = create_all_cpu_call_rcu_data(0);
-       assert(!err);
+       if (err) {
+               printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n");
+       }
 
        next_aff = 0;
 
index 883fd0c18add12ad4b97b4063f92c88dfa77732b..b48a35fe0f1c77ebaf9806cc03422ce8567e74ba 100644 (file)
@@ -379,7 +379,9 @@ int main(int argc, char **argv)
        count_dequeuer = malloc(2 * sizeof(*count_dequeuer) * nr_dequeuers);
        cds_lfs_init_rcu(&s);
        err = create_all_cpu_call_rcu_data(0);
-       assert(!err);
+       if (err) {
+               printf("Per-CPU call_rcu() worker threads unavailable. Using default global worker thread.\n");
+       }
 
        next_aff = 0;
 
This page took 0.026477 seconds and 4 git commands to generate.