FreeBSD/sys/kern/kern_lockf.c
/*
 * Perform consistency checks on the graph. Make sure the values of
 * v_order are correct. If checkorder is non-zero, check no vertex can
 * reach any other vertex with a smaller order.
 */
Perform consistency checks on the graph. Make sure the values of
v_order are correct. If checkorder is non-zero, check no vertex can
reach any other vertex with a smaller order.
Perform consistency checks on the graph . Make sure the values of v_order are correct . If checkorder is non - zero check no vertex can reach any other vertex with a smaller order .
static void
graph_check(struct owner_graph *g, int checkorder)
{
	int i, j;
	for (i = 0; i < g->g_size; i++) {
		if (!g->g_vertices[i]->v_owner)
			continue;
		KASSERT(g->g_vertices[i]->v_order == i,
		    ("lock graph vertices disordered"));
		if (checkorder) {
			for (j = 0; j < i; j++) {
				if (!g->g_vertices[j]->v_owner)
					continue;
				KASSERT(!graph_reaches(g->g_vertices[i],
					g->g_vertices[j], NULL),
				    ("lock graph vertices disordered"));
			}
		}
	}
}
static void graph_check ( struct owner_graph * g , int checkorder ) { int i , j ; for ( i = 0 ; i < g -> g_size ; i ++ ) { if ( ! g -> g_vertices [ i ] -> v_owner ) continue ; KASSERT ( g -> g_vertices [ i ] -> v_order == i , ( " " ) ) ; if ( checkorder ) { for ( j = 0 ; j < i ; j ++ ) { if ( ! g -> g_vertices [ j ] -> v_owner ) continue ; KASSERT ( ! graph_reaches ( g -> g_vertices [ i ] , g -> g_vertices [ j ] , NULL ) , ( " " ) ) ; } } } }
Perform consistency checks on the graph.
Perform consistency checks on the graph .