Commit 871da25b authored by Nils Goroll's avatar Nils Goroll

rename pesi_finish() -> task_fini()

I always got confused about this myself, so the name was probably bad
parent b581c6da
...@@ -346,7 +346,7 @@ pesi_new(struct ws *ws, struct pesi_tree *pesi_tree) ...@@ -346,7 +346,7 @@ pesi_new(struct ws *ws, struct pesi_tree *pesi_tree)
* For possible debuggung purposes, we record the fact that a pesi request is * For possible debuggung purposes, we record the fact that a pesi request is
* finishing * finishing
* *
* - in ved_task(), we call pesi_finish() to decrement the global counter and * - in ved_task(), we call task_fini() to decrement the global counter and
* notify the top request * notify the top request
* *
* for esi_level == 0, all cleanup happens in vdp_pesi_fini * for esi_level == 0, all cleanup happens in vdp_pesi_fini
...@@ -367,7 +367,7 @@ pesi_destroy(struct pesi **pesip) ...@@ -367,7 +367,7 @@ pesi_destroy(struct pesi **pesip)
/* /*
* next assert is only true because the topreq happens to call * next assert is only true because the topreq happens to call
* pesi_destroy() after pesi_finish() * pesi_destroy() after task_fini()
*/ */
assert(pesi_tree->task_running > 0); assert(pesi_tree->task_running > 0);
...@@ -380,7 +380,7 @@ pesi_destroy(struct pesi **pesip) ...@@ -380,7 +380,7 @@ pesi_destroy(struct pesi **pesip)
static void static void
pesi_finish(struct pesi_tree *pesi_tree, struct pesi *pesi) task_fini(struct pesi_tree *pesi_tree, struct pesi *pesi)
{ {
Lck_Lock(&pesi_tree->task_lock); Lck_Lock(&pesi_tree->task_lock);
assert(pesi_tree->task_running > 0); assert(pesi_tree->task_running > 0);
...@@ -834,11 +834,11 @@ ved_task(struct worker *wrk, void *priv) ...@@ -834,11 +834,11 @@ ved_task(struct worker *wrk, void *priv)
assert(pesi == req->transport_priv); assert(pesi == req->transport_priv);
req->transport_priv = NULL; req->transport_priv = NULL;
pesi_destroy(&pesi); pesi_destroy(&pesi);
pesi_finish(pesi_tree, pesi); task_fini(pesi_tree, pesi);
break; break;
case T_SUBREQ: case T_SUBREQ:
assert (node->type == T_SUBREQ); assert (node->type == T_SUBREQ);
pesi_finish(pesi_tree, req->transport_priv); task_fini(pesi_tree, req->transport_priv);
// XXX MAKE EFFICIENT // XXX MAKE EFFICIENT
// WOULD BE BETTER TO ONLY INSERT NODE WHEN READY // WOULD BE BETTER TO ONLY INSERT NODE WHEN READY
Lck_Lock(&pesi_tree->tree->tree_lock); Lck_Lock(&pesi_tree->tree->tree_lock);
...@@ -849,7 +849,7 @@ ved_task(struct worker *wrk, void *priv) ...@@ -849,7 +849,7 @@ ved_task(struct worker *wrk, void *priv)
default: default:
req_fini(req, wrk); req_fini(req, wrk);
pesi = NULL; pesi = NULL;
pesi_finish(pesi_tree, req->transport_priv); task_fini(pesi_tree, req->transport_priv);
} }
wrk->task.func = NULL; wrk->task.func = NULL;
...@@ -2067,7 +2067,7 @@ vdp_pesi_fini(struct req *req, void **priv) ...@@ -2067,7 +2067,7 @@ vdp_pesi_fini(struct req *req, void **priv)
assert(bytes_tree == pesi_tree->tree); assert(bytes_tree == pesi_tree->tree);
pesi_destroy(&pesi); pesi_destroy(&pesi);
pesi_finish(pesi_tree, pesi); task_fini(pesi_tree, pesi);
/* /*
* ensure that all tasks are done * ensure that all tasks are done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment