summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/include/queue.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/payloads/libpayload/include/queue.h b/payloads/libpayload/include/queue.h
index f8f09bf12e..2b64669435 100644
--- a/payloads/libpayload/include/queue.h
+++ b/payloads/libpayload/include/queue.h
@@ -268,6 +268,9 @@ struct { \
#define SIMPLEQ_END(head) NULL
#define SIMPLEQ_EMPTY(head) (SIMPLEQ_FIRST(head) == SIMPLEQ_END(head))
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
+#define SIMPLEQ_TAIL_NEXT(head) ((head)->sqh_last)
+#define SIMPLEQ_SINGLETON(head, field) \
+ (&SIMPLEQ_NEXT(SIMPLEQ_FIRST(head), field) == SIMPLEQ_TAIL_NEXT(head))
#define SIMPLEQ_FOREACH(var, head, field) \
for((var) = SIMPLEQ_FIRST(head); \