Commit 559e1cf5 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Pass worker explicitly to VBO_extend()

parent 393762be
......@@ -670,7 +670,7 @@ double BAN_Time(const struct ban *ban);
/* cache_busyobj.c */
struct busyobj *VBO_GetBusyObj(struct worker *, const struct req *);
void VBO_DerefBusyObj(struct worker *wrk, struct busyobj **busyobj);
void VBO_extend(struct objcore *, struct busyobj *, ssize_t);
void VBO_extend(struct worker *, struct objcore *, struct busyobj *, ssize_t);
ssize_t VBO_waitlen(struct worker *, struct objcore *, struct busyobj *,
ssize_t l);
void VBO_setstate(struct busyobj *bo, enum busyobj_state_e next);
......
......@@ -221,16 +221,18 @@ VBO_DerefBusyObj(struct worker *wrk, struct busyobj **pbo)
}
void
VBO_extend(struct objcore *oc, struct busyobj *bo, ssize_t l)
VBO_extend(struct worker *wrk, struct objcore *oc, struct busyobj *bo,
ssize_t l)
{
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC);
if (l == 0)
return;
assert(l > 0);
Lck_Lock(&bo->mtx);
ObjExtend(bo->wrk, oc, l);
ObjExtend(wrk, oc, l);
AZ(pthread_cond_broadcast(&bo->cond));
Lck_Unlock(&bo->mtx);
}
......
......@@ -98,7 +98,7 @@ VFP_Extend(const struct vfp_ctx *vc, ssize_t sz)
{
CHECK_OBJ_NOTNULL(vc, VFP_CTX_MAGIC);
VBO_extend(vc->oc, vc->bo, sz);
VBO_extend(vc->wrk, vc->oc, vc->bo, sz);
}
/**********************************************************************
......
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