static int num_readers, alloc_readers;
static int sig_done;
-void rcu_write_lock(void)
+void internal_urcu_lock(void)
{
int ret;
ret = pthread_mutex_lock(&urcu_mutex);
}
}
-void rcu_write_unlock(void)
+void internal_urcu_unlock(void)
{
int ret;
void synchronize_rcu(void)
{
- rcu_write_lock();
+ internal_urcu_lock();
switch_qparity();
switch_qparity();
- rcu_write_unlock();
+ internal_urcu_lock();
}
/*
{
void *oldptr;
+ internal_urcu_lock();
/*
* We can publish the new pointer before we change the current qparity.
* Readers seeing the new pointer while being in the previous qparity
switch_qparity();
switch_qparity();
+ internal_urcu_unlock();
return oldptr;
}
void urcu_register_thread(void)
{
- rcu_write_lock();
+ internal_urcu_lock();
urcu_add_reader(pthread_self());
- rcu_write_unlock();
+ internal_urcu_unlock();
}
void urcu_unregister_thread(void)
{
- rcu_write_lock();
+ internal_urcu_lock();
urcu_remove_reader(pthread_self());
- rcu_write_unlock();
+ internal_urcu_unlock();
}
void sigurcu_handler(int signo, siginfo_t *siginfo, void *context)