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

Function graph_insert_ordered

dpdk/lib/graph/graph.c:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static void
52graph_insert_ordered(struct graph *graph)
53{
54 struct graph *after, *g;
55
56 after = NULL;
57 STAILQ_FOREACH(g, &graph_list, next) {
58 if (g->id < graph->id)
59 after = g;
60 else if (g->id > graph->id)
61 break;
62 }
63 if (after == NULL) {
64 STAILQ_INSERT_HEAD(&graph_list, graph, next);
65 } else {
66 STAILQ_INSERT_AFTER(&graph_list, after, graph, next);
67 }
68}
69
70struct graph_head *
71graph_list_head_get(void)

Callers 2

rte_graph_createFunction · 0.85
graph_cloneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected