Commit 9011096f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Eliminate unneeded boc argument

parent 38a635c4
......@@ -852,7 +852,7 @@ typedef int objiterate_f(void *priv, int flush, const void *ptr, ssize_t len);
int ObjIterate(struct worker *, struct objcore *,
void *priv, objiterate_f *func);
int ObjGetSpace(struct worker *, struct objcore *, ssize_t *sz, uint8_t **ptr);
void ObjExtend(struct worker *, struct objcore *, struct boc *, ssize_t l);
void ObjExtend(struct worker *, struct objcore *, ssize_t l);
ssize_t ObjWaitExtend(struct worker *, struct objcore *, struct boc *, ssize_t l);
void ObjSetState(const struct objcore *, enum boc_state_e next);
void ObjWaitState(const struct objcore *, enum boc_state_e want);
......
......@@ -98,7 +98,7 @@ VFP_Extend(const struct vfp_ctx *vc, ssize_t sz)
{
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
ObjExtend(vc->wrk, vc->oc, vc->bo->boc, sz);
ObjExtend(vc->wrk, vc->oc, sz);
}
/**********************************************************************
......
......@@ -107,20 +107,20 @@ ObjGetSpace(struct worker *wrk, struct objcore *oc, ssize_t *sz, uint8_t **ptr)
*/
void
ObjExtend(struct worker *wrk, struct objcore *oc, struct boc *boc, ssize_t l)
ObjExtend(struct worker *wrk, struct objcore *oc, ssize_t l)
{
const struct obj_methods *om = obj_getmethods(oc);
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_ORNULL(oc->boc, BOC_MAGIC);
AN(om->objextend);
assert(l > 0);
if (boc != NULL) {
CHECK_OBJ_NOTNULL(boc, BOC_MAGIC);
Lck_Lock(&boc->mtx);
if (oc->boc != NULL) {
Lck_Lock(&oc->boc->mtx);
om->objextend(wrk, oc, l);
AZ(pthread_cond_broadcast(&boc->cond));
Lck_Unlock(&boc->mtx);
AZ(pthread_cond_broadcast(&oc->boc->cond));
Lck_Unlock(&oc->boc->mtx);
} else {
om->objextend(wrk, oc, l);
}
......
......@@ -254,7 +254,7 @@ VRB_Cache(struct req *req, ssize_t maxsize)
req->acct.req_bodybytes += l;
if (yet >= l)
yet -= l;
ObjExtend(req->wrk, req->body_oc, NULL, l);
ObjExtend(req->wrk, req->body_oc, l);
}
} while (vfps == VFP_OK);
......
......@@ -291,7 +291,7 @@ cnt_synth(struct worker *wrk, struct req *req)
sz = szl;
if (ObjGetSpace(wrk, req->objcore, &sz, &ptr) && sz >= szl) {
memcpy(ptr, VSB_data(synth_body), szl);
ObjExtend(wrk, req->objcore, NULL, szl);
ObjExtend(wrk, req->objcore, szl);
} else
szl = -1;
}
......
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