lib/libvarnishapi/vsl_dispatch.c
static int
vslq_process_ready(struct VSLQ *vslq, VSLQ_dispatch_f *func, void *priv)
{
	struct vtx *vtx;
	int i = 0;

	AN(vslq);

	while (!VTAILQ_EMPTY(&vslq->ready)) {
		vtx = VTAILQ_FIRST(&vslq->ready);
		CHECK_OBJ_NOTNULL(vtx, VTX_MAGIC);
		VTAILQ_REMOVE(&vslq->ready, vtx, list_vtx);
		AN(vtx->flags & VTX_F_READY);
		if (func != NULL)
			i = vslq_callback(vslq, vtx, func, priv);
		vtx_retire(vslq, &vtx);
		AZ(vtx);
		if (i)
			return (i);
	}

	return (0);
}
/* Test query and report any ready transactions */
Test query and report any ready transactions
Test query and report any ready transactions
static int
vslq_process_ready(struct VSLQ *vslq, VSLQ_dispatch_f *func, void *priv)
{
	struct vtx *vtx;
	int i = 0;
	AN(vslq);
	while (!VTAILQ_EMPTY(&vslq->ready)) {
		vtx = VTAILQ_FIRST(&vslq->ready);
		CHECK_OBJ_NOTNULL(vtx, VTX_MAGIC);
		VTAILQ_REMOVE(&vslq->ready, vtx, list_vtx);
		AN(vtx->flags & VTX_F_READY);
		if (func != NULL)
			i = vslq_callback(vslq, vtx, func, priv);
		vtx_retire(vslq, &vtx);
		AZ(vtx);
		if (i)
			return (i);
	}
	return (0);
}
static int vslq_process_ready ( struct VSLQ * vslq , VSLQ_dispatch_f * func , void * priv ) { struct vtx * vtx ; int i = 0 ; AN ( vslq ) ; while ( ! VTAILQ_EMPTY ( & vslq -> ready ) ) { vtx = VTAILQ_FIRST ( & vslq -> ready ) ; CHECK_OBJ_NOTNULL ( vtx , VTX_MAGIC ) ; VTAILQ_REMOVE ( & vslq -> ready , vtx , list_vtx ) ; AN ( vtx -> flags & VTX_F_READY ) ; if ( func != NULL ) i = vslq_callback ( vslq , vtx , func , priv ) ; vtx_retire ( vslq , & vtx ) ; AZ ( vtx ) ; if ( i ) return ( i ) ; } return ( 0 ) ; }
Test query and report any ready transactions
Test query and report any ready transactions