test_urcu_hash*: initialize TLS seeds
[urcu.git] / tests / test_urcu_hash_rw.c
index 48dc1a810c21f1ce921f2efc9d8da9c7c8a7a225..8802b9cd0a621d1d07fee0f4e7bfe368f0a287b6 100644 (file)
@@ -68,6 +68,8 @@ void *test_hash_rw_thr_reader(void *_count)
        printf_verbose("thread_begin %s, tid %lu\n",
                        "reader", urcu_get_thread_id());
 
+       URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL);
+
        set_affinity();
 
        rcu_register_thread();
@@ -127,6 +129,8 @@ void *test_hash_rw_thr_writer(void *_count)
        printf_verbose("thread_begin %s, tid %lu\n",
                        "writer", urcu_get_thread_id());
 
+       URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL);
+
        set_affinity();
 
        rcu_register_thread();
@@ -234,6 +238,8 @@ int test_hash_rw_populate_hash(void)
 
        printf("Starting rw test\n");
 
+       URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL);
+
        if ((add_unique || add_replace) && init_populate * 10 > init_pool_size) {
                printf("WARNING: required to populate %lu nodes (-k), but random "
 "pool is quite small (%lu values) and we are in add_unique (-u) or add_replace (-s) mode. Try with a "
This page took 0.030419 seconds and 4 git commands to generate.