FreeBSD/sys/kern/kern_lockf.c
/*
 * Return non-zero if y is reachable from x using a brute force
 * search. If reachable and path is non-null, return the route taken
 * in path.
 */
Return non-zero if y is reachable from x using a brute force
search. If reachable and path is non-null, return the route taken
in path.
Return non - zero if y is reachable from x using a brute force search . If reachable and path is non - null return the route taken in path .
static int
graph_reaches(struct owner_vertex *x, struct owner_vertex *y,
    struct owner_vertex_list *path)
{
	struct owner_edge *e;
	if (x == y) {
		if (path)
			TAILQ_INSERT_HEAD(path, x, v_link);
		return 1;
	}
	LIST_FOREACH(e, &x->v_outedges, e_outlink) {
		if (graph_reaches(e->e_to, y, path)) {
			if (path)
				TAILQ_INSERT_HEAD(path, x, v_link);
			return 1;
		}
	}
	return 0;
}
static int graph_reaches ( struct owner_vertex * x , struct owner_vertex * y , struct owner_vertex_list * path ) { struct owner_edge * e ; if ( x == y ) { if ( path ) TAILQ_INSERT_HEAD ( path , x , v_link ) ; return 1 ; } LIST_FOREACH ( e , & x -> v_outedges , e_outlink ) { if ( graph_reaches ( e -> e_to , y , path ) ) { if ( path ) TAILQ_INSERT_HEAD ( path , x , v_link ) ; return 1 ; } } return 0 ; }
Return non-zero if y is reachable from x using a brute force
 search.
Return non - zero if y is reachable from x using a brute force search .