Commit 8cccee24 authored by Nils Goroll's avatar Nils Goroll

rename ved_ -> vped_

ved_ is used in varnish-cache
parent 5ff084c4
...@@ -432,7 +432,7 @@ pesi_new(struct ws *ws, struct pesi_tree *pesi_tree) ...@@ -432,7 +432,7 @@ pesi_new(struct ws *ws, struct pesi_tree *pesi_tree)
/* /*
* shutting down a pesi request is a two stage process, because Req_Cleanup() in * shutting down a pesi request is a two stage process, because Req_Cleanup() in
* req_fini() called from ved_task() zeroes the workspace including our * req_fini() called from vped_task() zeroes the workspace including our
* per-request struct pesi, so removing the registration from * per-request struct pesi, so removing the registration from
* pesi_tree->task_head need to happen before Req_Cleanup(). * pesi_tree->task_head need to happen before Req_Cleanup().
* *
...@@ -448,7 +448,7 @@ pesi_new(struct ws *ws, struct pesi_tree *pesi_tree) ...@@ -448,7 +448,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 task_fini() to decrement the global counter and * - in vped_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
...@@ -938,7 +938,7 @@ set_closed(struct bytes_tree *tree, struct node *node, const struct worker *wrk) ...@@ -938,7 +938,7 @@ set_closed(struct bytes_tree *tree, struct node *node, const struct worker *wrk)
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static void v_matchproto_(task_func_t) static void v_matchproto_(task_func_t)
ved_task(struct worker *wrk, void *priv) vped_task(struct worker *wrk, void *priv)
{ {
struct req *req; struct req *req;
struct sess *sp; struct sess *sp;
...@@ -962,7 +962,7 @@ ved_task(struct worker *wrk, void *priv) ...@@ -962,7 +962,7 @@ ved_task(struct worker *wrk, void *priv)
} }
CAST_OBJ_NOTNULL(req, priv, REQ_MAGIC); CAST_OBJ_NOTNULL(req, priv, REQ_MAGIC);
VSLdbgv(req, "ved_task: req=%p", req); VSLdbgv(req, "vped_task: req=%p", req);
assert(req->esi_level > 0); assert(req->esi_level > 0);
sp = req->sp; sp = req->sp;
...@@ -979,15 +979,15 @@ ved_task(struct worker *wrk, void *priv) ...@@ -979,15 +979,15 @@ ved_task(struct worker *wrk, void *priv)
VSLb_ts_req(req, "Start", W_TIM_real(wrk)); VSLb_ts_req(req, "Start", W_TIM_real(wrk));
#ifdef DEBUG #ifdef DEBUG
VSLdbgv(req, "ved_task: new req->vdc=%p nxt=%p", req->vdc, VSLdbgv(req, "vped_task: new req->vdc=%p nxt=%p", req->vdc,
req->vdc->nxt); req->vdc->nxt);
if (VTAILQ_EMPTY(&req->vdc->vdp)) if (VTAILQ_EMPTY(&req->vdc->vdp))
VSLdbg(req, "ved_task: VDP list empty"); VSLdbg(req, "vped_task: VDP list empty");
else { else {
struct vdp_entry *vdpe = VTAILQ_LAST(&req->vdc->vdp, struct vdp_entry *vdpe = VTAILQ_LAST(&req->vdc->vdp,
vdp_entry_s); vdp_entry_s);
CHECK_OBJ_NOTNULL(vdpe, VDP_ENTRY_MAGIC); CHECK_OBJ_NOTNULL(vdpe, VDP_ENTRY_MAGIC);
VSLdbgv(req, "ved_task: last VDP=%s", vdpe->vdp->name); VSLdbgv(req, "vped_task: last VDP=%s", vdpe->vdp->name);
} }
#endif #endif
...@@ -1135,7 +1135,7 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1135,7 +1135,7 @@ vped_include(struct req *preq, const char *src, const char *host,
struct bytes_tree *tree; struct bytes_tree *tree;
struct pesi *pesi2; struct pesi *pesi2;
VSLdbg(preq, "ved_include: enter"); VSLdbg(preq, "vped_include: enter");
CHECK_OBJ_NOTNULL(preq, REQ_MAGIC); CHECK_OBJ_NOTNULL(preq, REQ_MAGIC);
CHECK_OBJ_NOTNULL(preq->topreq, REQ_MAGIC); CHECK_OBJ_NOTNULL(preq->topreq, REQ_MAGIC);
sp = preq->sp; sp = preq->sp;
...@@ -1157,10 +1157,10 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1157,10 +1157,10 @@ vped_include(struct req *preq, const char *src, const char *host,
req = Req_New(wrk, sp); req = Req_New(wrk, sp);
AN(req); AN(req);
VSLdbgv(preq, "ved_include: new req=%p", req); VSLdbgv(preq, "vped_include: new req=%p", req);
AZ(req->vsl->wid); AZ(req->vsl->wid);
req->vsl->wid = VXID_Get(wrk, VSL_CLIENTMARKER); req->vsl->wid = VXID_Get(wrk, VSL_CLIENTMARKER);
VSLdbgv(preq, "ved_include: new xid=%d", VXID(req->vsl->wid)); VSLdbgv(preq, "vped_include: new xid=%d", VXID(req->vsl->wid));
VSLb(req->vsl, SLT_Begin, "req %u esi", VXID(preq->vsl->wid)); VSLb(req->vsl, SLT_Begin, "req %u esi", VXID(preq->vsl->wid));
VSLb(preq->vsl, SLT_Link, "req %u esi", VXID(req->vsl->wid)); VSLb(preq->vsl, SLT_Link, "req %u esi", VXID(req->vsl->wid));
...@@ -1211,15 +1211,15 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1211,15 +1211,15 @@ vped_include(struct req *preq, const char *src, const char *host,
req->t_req = preq->t_req; req->t_req = preq->t_req;
#ifdef DEBUG #ifdef DEBUG
VSLdbgv(preq, "ved_include: preq->vdc=%p nxt=%p", preq->vdc, VSLdbgv(preq, "vped_include: preq->vdc=%p nxt=%p", preq->vdc,
preq->vdc->nxt); preq->vdc->nxt);
if (VTAILQ_EMPTY(&preq->vdc->vdp)) if (VTAILQ_EMPTY(&preq->vdc->vdp))
VSLdbg(preq, "ved_include: preq VDP list empty"); VSLdbg(preq, "vped_include: preq VDP list empty");
else if (req->esi_level > 1) { else if (req->esi_level > 1) {
struct vdp_entry *vdpe = VTAILQ_LAST(&preq->vdc->vdp, struct vdp_entry *vdpe = VTAILQ_LAST(&preq->vdc->vdp,
vdp_entry_s); vdp_entry_s);
CHECK_OBJ_NOTNULL(vdpe, VDP_ENTRY_MAGIC); CHECK_OBJ_NOTNULL(vdpe, VDP_ENTRY_MAGIC);
VSLdbgv(preq, "ved_include: preq last VDP=%s", vdpe->vdp->name); VSLdbgv(preq, "vped_include: preq last VDP=%s", vdpe->vdp->name);
} }
#endif #endif
...@@ -1243,7 +1243,7 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1243,7 +1243,7 @@ vped_include(struct req *preq, const char *src, const char *host,
assert(node->type == T_NEXUS); assert(node->type == T_NEXUS);
node->nexus.req = req; node->nexus.req = req;
VSLdbgv(preq, "ved_include: attempt new thread req=%p", req); VSLdbgv(preq, "vped_include: attempt new thread req=%p", req);
if (pesi->flags & PF_CFG_BLOCK_FINAL) { if (pesi->flags & PF_CFG_BLOCK_FINAL) {
/* XXX because of T_FINAL blocking in the subreq thread, these /* XXX because of T_FINAL blocking in the subreq thread, these
...@@ -1266,18 +1266,18 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1266,18 +1266,18 @@ vped_include(struct req *preq, const char *src, const char *host,
} }
if (pesi->flags & PF_CFG_SERIAL) { if (pesi->flags & PF_CFG_SERIAL) {
ved_task(wrk, req); vped_task(wrk, req);
return (0); return (0);
} }
if (pesi->flags & PF_CFG_THREAD) { if (pesi->flags & PF_CFG_THREAD) {
req->task.func = ved_task; req->task.func = vped_task;
req->task.priv = req; req->task.priv = req;
AZ(Pool_Task(wrk->pool, &req->task, TASK_QUEUE_RUSH)); AZ(Pool_Task(wrk->pool, &req->task, TASK_QUEUE_RUSH));
return (1); return (1);
} }
if (Pool_Task_Arg(wrk, TASK_QUEUE_REQ, ved_task, &req, sizeof req) == 1) if (Pool_Task_Arg(wrk, TASK_QUEUE_REQ, vped_task, &req, sizeof req) == 1)
return (1); return (1);
pesi->no_thread++; pesi->no_thread++;
...@@ -1292,7 +1292,7 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1292,7 +1292,7 @@ vped_include(struct req *preq, const char *src, const char *host,
wrk->task.func = NULL; wrk->task.func = NULL;
wrk->task.priv = NULL; wrk->task.priv = NULL;
WS_Release(wrk->aws, 0); WS_Release(wrk->aws, 0);
ved_task(wrk, req); vped_task(wrk, req);
return (0); return (0);
} }
...@@ -1306,7 +1306,7 @@ vped_include(struct req *preq, const char *src, const char *host, ...@@ -1306,7 +1306,7 @@ vped_include(struct req *preq, const char *src, const char *host,
#endif #endif
static ssize_t static ssize_t
ved_decode_len(struct req *req, const uint8_t **pp) vped_decode_len(struct req *req, const uint8_t **pp)
{ {
const uint8_t *p; const uint8_t *p;
ssize_t l; ssize_t l;
...@@ -2444,7 +2444,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -2444,7 +2444,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv,
case VEC_V1: case VEC_V1:
case VEC_V2: case VEC_V2:
case VEC_V8: case VEC_V8:
pecx->l = ved_decode_len(req, &pecx->p); pecx->l = vped_decode_len(req, &pecx->p);
if (pecx->l < 0) if (pecx->l < 0)
return (-1); return (-1);
Debug("VEC_V(%d)\n", (int)pecx->l); Debug("VEC_V(%d)\n", (int)pecx->l);
...@@ -2452,7 +2452,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -2452,7 +2452,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv,
assert(*pecx->p == VEC_C1 || assert(*pecx->p == VEC_C1 ||
*pecx->p == VEC_C2 || *pecx->p == VEC_C2 ||
*pecx->p == VEC_C8); *pecx->p == VEC_C8);
l = ved_decode_len(req, &pecx->p); l = vped_decode_len(req, &pecx->p);
if (l < 0) if (l < 0)
return (-1); return (-1);
...@@ -2474,7 +2474,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -2474,7 +2474,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv,
case VEC_S1: case VEC_S1:
case VEC_S2: case VEC_S2:
case VEC_S8: case VEC_S8:
pecx->l = ved_decode_len(req, &pecx->p); pecx->l = vped_decode_len(req, &pecx->p);
if (pecx->l < 0) if (pecx->l < 0)
return (-1); return (-1);
Debug("SKIP1(%d)\n", (int)pecx->l); Debug("SKIP1(%d)\n", (int)pecx->l);
...@@ -2498,13 +2498,13 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -2498,13 +2498,13 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv,
node_insert(tree, node, child); node_insert(tree, node, child);
VSLdbg(req, "ved_vdp: call ved_include"); VSLdbg(req, "vped_vdp: call vped_include");
parallel = parallel =
vped_include(req, (const char*)q, vped_include(req, (const char*)q,
(const char*)pecx->p, (const char*)pecx->p,
pesi, child); pesi, child);
child = NULL; child = NULL;
VSLdbgv(req, "ved_vdp: vped_include()=%d", VSLdbgv(req, "vped_vdp: vped_include()=%d",
parallel); parallel);
assert(parallel >= 0); assert(parallel >= 0);
Debug("INCL [%s][%s] END\n", q, pecx->p); Debug("INCL [%s][%s] END\n", q, pecx->p);
...@@ -2539,7 +2539,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv, ...@@ -2539,7 +2539,7 @@ vdp_pesi_bytes(struct req *req, enum vdp_action act, void **priv,
* in the same storage segment, so loop over storage * in the same storage segment, so loop over storage
* until we have processed them all. * until we have processed them all.
*/ */
VSLdbgv(req, "ved_vdp: pecx->state=%d", pecx->state); VSLdbgv(req, "vped_vdp: pecx->state=%d", pecx->state);
if (pecx->l <= len) { if (pecx->l <= len) {
if (pecx->state == 3) if (pecx->state == 3)
retval = VDP_bytes(req, act, pp, pecx->l); retval = VDP_bytes(req, act, pp, pecx->l);
...@@ -2829,7 +2829,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody) ...@@ -2829,7 +2829,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
* - VDP_DeliverObj() * - VDP_DeliverObj()
* - VDP_close() * - VDP_close()
* *
* from ved_task(): * from vped_task():
* - req_fini() * - req_fini()
*/ */
return; return;
......
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