提交 47c8c52d 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

call rcu_end_read

上级 d065f375
......@@ -95,6 +95,7 @@ bget(uint dev, uint sector)
cv_sleep(&b->cv, &b->lock);
release(&b->lock);
rcu_end_read();
goto loop;
}
rcu_end_read();
......
......@@ -111,6 +111,7 @@ ns_lookup(struct ns *ns, uint key)
while (e != NULL) {
if (e->key == key) {
rcu_end_read();
return e->val;
}
e = e->next;
......@@ -172,8 +173,10 @@ ns_enumerate(struct ns *ns, void *(*f)(uint, void *))
struct elem *e = ns->table[i].chain;
while (e != NULL) {
void *r = (*f)(e->key, e->val);
if (r)
if (r) {
rcu_end_read();
return r;
}
e = e->next;
}
}
......@@ -190,8 +193,10 @@ ns_enumerate_key(struct ns *ns, uint key, void *(*f)(void *))
while (e) {
if (e->key == key) {
void *r = (*f)(e->val);
if (r)
if (r) {
rcu_end_read();
return r;
}
}
e = e->next;
}
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论