| 219 | #define lqueue_dequeue(q_) \ |
| 220 | lqueue_entry((q_), lqueue_dequeue_(tcon_unwrap(q_))) |
| 221 | static 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 */ |
nothing calls this directly
no test coverage detected