FreeBSD/sys/kern/kern_lockf.c
/*
 * Calculate the sub-set of vertices v from the affected region [y..x]
 * where v reaches x. Return the number of vertices in this subset.
 */
Calculate the sub-set of vertices v from the affected region [y..x]
where v reaches x. Return the number of vertices in this subset.
Calculate the sub - set of vertices v from the affected region [ y .. x ] where v reaches x . Return the number of vertices in this subset .
static int
graph_delta_backward(struct owner_graph *g, struct owner_vertex *x,
    struct owner_vertex *y, struct owner_vertex_list *delta)
{
	uint32_t gen;
	struct owner_vertex *v;
	struct owner_edge *e;
	int n;
	TAILQ_INIT(delta);
	TAILQ_INSERT_TAIL(delta, x, v_link);
	v = x;
	n = 1;
	gen = g->g_gen;
	while (v) {
		LIST_FOREACH(e, &v->v_inedges, e_inlink) {
			if (e->e_from->v_order > y->v_order
			    && e->e_from->v_gen != gen) {
				e->e_from->v_gen = gen;
				TAILQ_INSERT_HEAD(delta, e->e_from, v_link);
				n++;
			}
		}
		v = TAILQ_PREV(v, owner_vertex_list, v_link);
	}
	return (n);
}
static int graph_delta_backward ( struct owner_graph * g , struct owner_vertex * x , struct owner_vertex * y , struct owner_vertex_list * delta ) { uint32_t gen ; struct owner_vertex * v ; struct owner_edge * e ; int n ; TAILQ_INIT ( delta ) ; TAILQ_INSERT_TAIL ( delta , x , v_link ) ; v = x ; n = 1 ; gen = g -> g_gen ; while ( v ) { LIST_FOREACH ( e , & v -> v_inedges , e_inlink ) { if ( e -> e_from -> v_order > y -> v_order && e -> e_from -> v_gen != gen ) { e -> e_from -> v_gen = gen ; TAILQ_INSERT_HEAD ( delta , e -> e_from , v_link ) ; n ++ ; } } v = TAILQ_PREV ( v , owner_vertex_list , v_link ) ; } return ( n ) ; }
Calculate the sub-set of vertices v from the affected region [y..x]
 where v reaches x.
Calculate the sub - set of vertices v from the affected region [ y .. x ] where v reaches x .
/*
	 * We start with a set containing just x. Then for each vertex
	 * v in the set so far unprocessed, we add each vertex that v
	 * has an in-edge from and that is within the affected region
	 * [y..x].
	 */