MCPcopy Create free account
hub / github.com/ElementsProject/lightning / lqueue_dequeue_

Function lqueue_dequeue_

ccan/ccan/lqueue/lqueue.h:221–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219#define lqueue_dequeue(q_) \
220 lqueue_entry((q_), lqueue_dequeue_(tcon_unwrap(q_)))
221static inline struct lqueue_link *lqueue_dequeue_(struct lqueue_ *q)
222{
223 struct lqueue_link *front;
224
225 if (lqueue_empty_(q))
226 return NULL;
227
228 front = lqueue_front_(q);
229 if (front == lqueue_back_(q)) {
230 assert(front->next == front);
231 q->back = NULL;
232 } else {
233 q->back->next = front->next;
234 }
235 return front;
236}
237
238#endif /* CCAN_LQUEUE_H */

Callers

nothing calls this directly

Calls 3

lqueue_empty_Function · 0.85
lqueue_front_Function · 0.85
lqueue_back_Function · 0.85

Tested by

no test coverage detected