Lines Matching full:edge
104 static struct unix_vertex *unix_edge_successor(struct unix_edge *edge) in unix_edge_successor() argument
109 if (edge->successor->listener) in unix_edge_successor()
110 return unix_sk(edge->successor->listener)->vertex; in unix_edge_successor()
112 return edge->successor->vertex; in unix_edge_successor()
140 static void unix_add_edge(struct scm_fp_list *fpl, struct unix_edge *edge) in unix_add_edge() argument
142 struct unix_vertex *vertex = edge->predecessor->vertex; in unix_add_edge()
152 edge->predecessor->vertex = vertex; in unix_add_edge()
156 list_add_tail(&edge->vertex_entry, &vertex->edges); in unix_add_edge()
158 unix_update_graph(unix_edge_successor(edge)); in unix_add_edge()
161 static void unix_del_edge(struct scm_fp_list *fpl, struct unix_edge *edge) in unix_del_edge() argument
163 struct unix_vertex *vertex = edge->predecessor->vertex; in unix_del_edge()
166 unix_update_graph(unix_edge_successor(edge)); in unix_del_edge()
168 list_del(&edge->vertex_entry); in unix_del_edge()
172 edge->predecessor->vertex = NULL; in unix_del_edge()
201 struct unix_edge *edge; in unix_add_edges() local
206 edge = fpl->edges + i++; in unix_add_edges()
207 edge->predecessor = inflight; in unix_add_edges()
208 edge->successor = receiver; in unix_add_edges()
210 unix_add_edge(fpl, edge); in unix_add_edges()
236 struct unix_edge *edge = fpl->edges + i++; in unix_del_edges() local
238 unix_del_edge(fpl, edge); in unix_del_edges()
309 struct unix_edge *edge; in unix_vertex_dead() local
313 list_for_each_entry(edge, &vertex->edges, vertex_entry) { in unix_vertex_dead()
314 struct unix_vertex *next_vertex = unix_edge_successor(edge); in unix_vertex_dead()
329 edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry); in unix_vertex_dead()
330 u = edge->predecessor; in unix_vertex_dead()
346 struct unix_edge *edge; in unix_collect_skb() local
349 edge = list_first_entry(&vertex->edges, typeof(*edge), vertex_entry); in unix_collect_skb()
350 u = edge->predecessor; in unix_collect_skb()
376 struct unix_edge *edge; in unix_scc_cyclic() local
385 list_for_each_entry(edge, &vertex->edges, vertex_entry) { in unix_scc_cyclic()
386 if (unix_edge_successor(edge) == vertex) in unix_scc_cyclic()
400 struct unix_edge *edge; in __unix_walk_scc() local
415 list_for_each_entry(edge, &vertex->edges, vertex_entry) { in __unix_walk_scc()
416 struct unix_vertex *next_vertex = unix_edge_successor(edge); in __unix_walk_scc()
424 * 1. Push a forward edge to edge_stack and set in __unix_walk_scc()
427 list_add(&edge->stack_entry, &edge_stack); in __unix_walk_scc()
432 /* 2. Pop the edge directed to the current vertex in __unix_walk_scc()
436 edge = list_first_entry(&edge_stack, typeof(*edge), stack_entry); in __unix_walk_scc()
437 list_del_init(&edge->stack_entry); in __unix_walk_scc()
440 vertex = edge->predecessor->vertex; in __unix_walk_scc()
448 /* Loop detected by a back/cross edge. in __unix_walk_scc()