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_birdloop *this_rcu_birdloop = NULL; -static list rcu_coro_list; +static list rcu_birdloop_list; -static struct rcu_coro main_rcu_coro; +static struct rcu_birdloop main_rcu_birdloop; 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_birdloop *rc; + WALK_LIST(rc, rcu_birdloop_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_birdloop_start(struct rcu_birdloop *rc) { LOCK_DOMAIN(resource, rcu_domain); - add_tail(&rcu_coro_list, &rc->n); - this_rcu_coro = rc; + add_tail(&rcu_birdloop_list, &rc->n); + this_rcu_birdloop = rc; UNLOCK_DOMAIN(resource, rcu_domain); } void -rcu_coro_stop(struct rcu_coro *rc) +rcu_birdloop_stop(struct rcu_birdloop *rc) { LOCK_DOMAIN(resource, rcu_domain); - this_rcu_coro = NULL; + this_rcu_birdloop = 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_birdloop_list); + rcu_birdloop_start(&main_rcu_birdloop); } |