o = oc->obj;
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
+ CHECK_OBJ_NOTNULL(o->objhead, OBJHEAD_MAGIC);
assert(oc->timer_idx != BINHEAP_NOIDX);
binheap_delete(exp_heap, oc->timer_idx);
assert(oc->timer_idx == BINHEAP_NOIDX);
WSP(sp, SLT_Debug,
"on waiting list <%s>", oh->hash);
sp->objhead = oh;
+ sp->wrk = NULL;
Lck_Unlock(&oh->mtx);
return (NULL);
}
unsigned u;
struct sess *sp;
+ CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
+ Lck_AssertHeld(&oh->mtx);
for (u = 0; u < params->rush_exponent; u++) {
sp = VTAILQ_FIRST(&oh->waitinglist);
if (sp == NULL)
return;
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ AZ(sp->wrk);
VTAILQ_REMOVE(&oh->waitinglist, sp, list);
DSL(0x20, SLT_Debug, sp->id, "off waiting list");
WRK_QueueSession(sp);
w->lastused = TIM_real();
VTAILQ_INSERT_HEAD(&qp->idle, w, list);
if (!stats_clean) {
- Lck_Lock(&wstat_mtx);
- wrk_sumstat(w);
+ WRK_SumStat(w);
stats_clean = 1;
- Lck_Unlock(&wstat_mtx);
}
Lck_CondWait(&w->cond, &qp->mtx);
}
AZ(w->wfd);
assert(w->wlp == w->wlb);
w->wrq = NULL;
+ HSH_Cleanup(w);
if (!Lck_Trylock(&wstat_mtx)) {
wrk_sumstat(w);
stats_clean = 1;
struct sess *sess;
CAST_OBJ_NOTNULL(sess, priv, SESS_MAGIC);
+ AZ(sess->wrk);
THR_SetSession(sess);
sess->wrk = w;
CHECK_OBJ_ORNULL(w->nobj, OBJECT_MAGIC);
void
WRK_QueueSession(struct sess *sp)
{
+ CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+ AZ(sp->wrk);
sp->workreq.func = wrk_do_cnt_sess;
sp->workreq.priv = sp;
if (WRK_Queue(&sp->workreq) == 0)