*/
struct urcu_reader __thread urcu_reader;
-/* Thread IDs of registered readers */
-#define INIT_NUM_THREADS 4
-
#ifdef DEBUG_YIELD
unsigned int yield_active;
unsigned int __thread rand_yield;
void rcu_register_thread(void)
{
- internal_urcu_lock();
- urcu_init(); /* In case gcc does not support constructor attribute */
urcu_reader.tid = pthread_self();
assert(urcu_reader.need_mb == 0);
assert(urcu_reader.ctr == 0);
+
+ internal_urcu_lock();
+ urcu_init(); /* In case gcc does not support constructor attribute */
list_add(&urcu_reader.head, ®istry);
internal_urcu_unlock();
}