rcuja: fix randomness seed (per-thread), use u64 keyspace for random range
[userspace-rcu.git] / tests / test_urcu_ja.c
index 8c7e7277019edfe33570e5e9df897eebbeff5f68..22c336bd77a704cec5c9058d686ed93441dc5f06 100644 (file)
@@ -853,6 +853,8 @@ void *test_ja_rw_thr_reader(void *_count)
        printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
                        "reader", pthread_self(), (unsigned long) gettid());
 
+       URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL);
+
        set_affinity();
 
        rcu_register_thread();
@@ -916,6 +918,8 @@ void *test_ja_rw_thr_writer(void *_count)
        printf_verbose("thread_begin %s, thread id : %lx, tid %lu\n",
                        "writer", pthread_self(), (unsigned long) gettid());
 
+       URCU_TLS(rand_lookup) = urcu_get_thread_id() ^ time(NULL);
+
        set_affinity();
 
        rcu_register_thread();
This page took 0.022277 seconds and 4 git commands to generate.