rculfhash: add unique
[urcu.git] / tests / test_urcu_hash.c
index 59356568bb2602cedea8c98e847f0a9dfe829862..44b9531b2fb8080b1a7e5bf02320669374f5bc6e 100644 (file)
@@ -405,9 +405,12 @@ void *thr_writer(void *_count)
                                (void *)(unsigned long)(rand_r(&rand_lookup) % RAND_POOL),
                                sizeof(void *),
                                (void *) 0x42);
-                       ht_add(test_ht, node);
+                       ret = ht_add_unique(test_ht, node);
                        rcu_read_unlock();
-                       nr_add++;
+                       if (ret)
+                               nr_addexist++;
+                       else
+                               nr_add++;
                } else {
                        /* May delete */
                        rcu_read_lock();
This page took 0.030155 seconds and 4 git commands to generate.