MCPcopy Create free account
hub / github.com/F-Stack/f-stack / graph_add_indices

Function graph_add_indices

freebsd/kern/kern_lockf.c:2191–2208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2189}
2190
2191static int
2192graph_add_indices(int *indices, int n, struct owner_vertex_list *set)
2193{
2194 struct owner_vertex *v;
2195 int i, j;
2196
2197 TAILQ_FOREACH(v, set, v_link) {
2198 for (i = n;
2199 i > 0 && indices[i - 1] > v->v_order; i--)
2200 ;
2201 for (j = n - 1; j >= i; j--)
2202 indices[j + 1] = indices[j];
2203 indices[i] = v->v_order;
2204 n++;
2205 }
2206
2207 return (n);
2208}
2209
2210static int
2211graph_assign_indices(struct owner_graph *g, int *indices, int nextunused,

Callers 1

graph_add_edgeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected