lib/libvarnishapi/vsl_dispatch.c
static void
vtx_mark_complete(struct VSLQ *vslq, struct vtx *vtx)
{

	AN(vslq);
	AN(vtx->flags & VTX_F_END);
	AZ(vtx->flags & VTX_F_COMPLETE);

	if (vtx->type == VSL_t_unknown)
		vtx_diag(vtx, "vtx of unknown type marked complete");

	vtx->flags |= VTX_F_COMPLETE;
	VTAILQ_REMOVE(&vslq->incomplete, vtx, list_vtx);

	while (1) {
		AZ(vtx->flags & VTX_F_READY);
		if (vtx->flags & VTX_F_COMPLETE &&
		    vtx->n_child == vtx->n_childready)
			vtx->flags |= VTX_F_READY;
		else
			return;
		if (vtx->parent == NULL) {
			/* Top level vtx ready */
			VTAILQ_INSERT_TAIL(&vslq->ready, vtx, list_vtx);
			return;
		}
		vtx = vtx->parent;
		vtx->n_childready++;
		assert(vtx->n_child >= vtx->n_childready);
	}
}
/* Mark a vtx complete, update child counters and if possible push it or
   it's top parent to the ready state */
Mark a vtx complete, update child counters and if possible push it or
it's top parent to the ready state
Mark a vtx complete update child counters and if possible push it or it ' s top parent to the ready state
static void
vtx_mark_complete(struct VSLQ *vslq, struct vtx *vtx)
{
	AN(vslq);
	AN(vtx->flags & VTX_F_END);
	AZ(vtx->flags & VTX_F_COMPLETE);
	if (vtx->type == VSL_t_unknown)
		vtx_diag(vtx, "vtx of unknown type marked complete");
	vtx->flags |= VTX_F_COMPLETE;
	VTAILQ_REMOVE(&vslq->incomplete, vtx, list_vtx);
	while (1) {
		AZ(vtx->flags & VTX_F_READY);
		if (vtx->flags & VTX_F_COMPLETE &&
		    vtx->n_child == vtx->n_childready)
			vtx->flags |= VTX_F_READY;
		else
			return;
		if (vtx->parent == NULL) {
			VTAILQ_INSERT_TAIL(&vslq->ready, vtx, list_vtx);
			return;
		}
		vtx = vtx->parent;
		vtx->n_childready++;
		assert(vtx->n_child >= vtx->n_childready);
	}
}
static void vtx_mark_complete ( struct VSLQ * vslq , struct vtx * vtx ) { AN ( vslq ) ; AN ( vtx -> flags & VTX_F_END ) ; AZ ( vtx -> flags & VTX_F_COMPLETE ) ; if ( vtx -> type == VSL_t_unknown ) vtx_diag ( vtx , " " ) ; vtx -> flags |= VTX_F_COMPLETE ; VTAILQ_REMOVE ( & vslq -> incomplete , vtx , list_vtx ) ; while ( 1 ) { AZ ( vtx -> flags & VTX_F_READY ) ; if ( vtx -> flags & VTX_F_COMPLETE && vtx -> n_child == vtx -> n_childready ) vtx -> flags |= VTX_F_READY ; else return ; if ( vtx -> parent == NULL ) { VTAILQ_INSERT_TAIL ( & vslq -> ready , vtx , list_vtx ) ; return ; } vtx = vtx -> parent ; vtx -> n_childready ++ ; assert ( vtx -> n_child >= vtx -> n_childready ) ; } }
Mark a vtx complete, update child counters and if possible push it or
it's top parent to the ready state
Mark a vtx complete update child counters and if possible push it or it ' s top parent to the ready state
/* Top level vtx ready */