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

Function lqueue_enqueue_

ccan/ccan/lqueue/lqueue.h:199–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197#define lqueue_enqueue(q_, e_) \
198 lqueue_enqueue_(tcon_unwrap(q_), tcon_member_of((q_), canary, (e_)))
199static inline void lqueue_enqueue_(struct lqueue_ *q, struct lqueue_link *e)
200{
201 if (lqueue_empty_(q)) {
202 /* New entry will be both front and back of queue */
203 e->next = e;
204 q->back = e;
205 } else {
206 e->next = lqueue_front_(q);
207 q->back->next = e;
208 q->back = e;
209 }
210}
211
212/**
213 * lqueue_dequeue - remove and return the entry from the front of the queue

Callers

nothing calls this directly

Calls 2

lqueue_empty_Function · 0.85
lqueue_front_Function · 0.85

Tested by

no test coverage detected