Lines Matching refs:qe
131 struct lockdep_bfs *qe = NULL; in lockdep_graph_get_shortest_cycle() local
137 qe = calloc(1, sizeof(*qe)); in lockdep_graph_get_shortest_cycle()
138 if (!qe) in lockdep_graph_get_shortest_cycle()
140 qe->node = node; in lockdep_graph_get_shortest_cycle()
141 qe->path = malloc(sizeof(uintptr_t)); in lockdep_graph_get_shortest_cycle()
142 if (!qe->path) in lockdep_graph_get_shortest_cycle()
144 qe->path[0] = node->lock_id; in lockdep_graph_get_shortest_cycle()
145 qe->pathlen = 1; in lockdep_graph_get_shortest_cycle()
146 TAILQ_INSERT_TAIL(&queue, qe, link); in lockdep_graph_get_shortest_cycle()
152 qe = TAILQ_FIRST(&queue); in lockdep_graph_get_shortest_cycle()
153 n = qe->node; in lockdep_graph_get_shortest_cycle()
154 TAILQ_REMOVE(&queue, qe, link); in lockdep_graph_get_shortest_cycle()
159 size_t nlen = qe->pathlen + 1; in lockdep_graph_get_shortest_cycle()
165 tmp = realloc(qe->path, in lockdep_graph_get_shortest_cycle()
169 free(qe->path); in lockdep_graph_get_shortest_cycle()
173 qe->path = tmp; in lockdep_graph_get_shortest_cycle()
174 qe->path[nlen - 1] = 0; in lockdep_graph_get_shortest_cycle()
175 ret = qe->path; in lockdep_graph_get_shortest_cycle()
185 nlen = qe->pathlen + 1; in lockdep_graph_get_shortest_cycle()
194 memcpy(nqe->path, qe->path, in lockdep_graph_get_shortest_cycle()
195 qe->pathlen * sizeof(uintptr_t)); in lockdep_graph_get_shortest_cycle()
200 free(qe->path); in lockdep_graph_get_shortest_cycle()
201 free(qe); in lockdep_graph_get_shortest_cycle()
202 qe = NULL; in lockdep_graph_get_shortest_cycle()
206 free(qe); in lockdep_graph_get_shortest_cycle()