diff options
Diffstat (limited to 'lib/rcu.c')
-rw-r--r-- | lib/rcu.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -13,15 +13,15 @@ */ #include "lib/rcu.h" -#include "lib/coro.h" +#include "lib/io-loop.h" #include "lib/locking.h" _Atomic uint rcu_gp_ctl = RCU_NEST_CNT; -_Thread_local struct rcu_coro *this_rcu_coro = NULL; +_Thread_local struct rcu_thread *this_rcu_thread = NULL; -static list rcu_coro_list; +static list rcu_thread_list; -static struct rcu_coro main_rcu_coro; +static struct rcu_thread main_rcu_thread; DEFINE_DOMAIN(resource); static DOMAIN(resource) rcu_domain; @@ -37,10 +37,10 @@ static void update_counter_and_wait(void) { atomic_fetch_xor(&rcu_gp_ctl, RCU_GP_PHASE); - struct rcu_coro *rc; - WALK_LIST(rc, rcu_coro_list) + struct rcu_thread *rc; + WALK_LIST(rc, rcu_thread_list) while (rcu_gp_ongoing(&rc->ctl)) - coro_yield(); + birdloop_yield(); } void @@ -53,19 +53,19 @@ synchronize_rcu(void) } void -rcu_coro_start(struct rcu_coro *rc) +rcu_thread_start(struct rcu_thread *rc) { LOCK_DOMAIN(resource, rcu_domain); - add_tail(&rcu_coro_list, &rc->n); - this_rcu_coro = rc; + add_tail(&rcu_thread_list, &rc->n); + this_rcu_thread = rc; UNLOCK_DOMAIN(resource, rcu_domain); } void -rcu_coro_stop(struct rcu_coro *rc) +rcu_thread_stop(struct rcu_thread *rc) { LOCK_DOMAIN(resource, rcu_domain); - this_rcu_coro = NULL; + this_rcu_thread = NULL; rem_node(&rc->n); UNLOCK_DOMAIN(resource, rcu_domain); } @@ -74,6 +74,6 @@ void rcu_init(void) { rcu_domain = DOMAIN_NEW(resource, "Read-Copy-Update"); - init_list(&rcu_coro_list); - rcu_coro_start(&main_rcu_coro); + init_list(&rcu_thread_list); + rcu_thread_start(&main_rcu_thread); } |