diff --git a/sys/sys/queue.h b/sys/sys/queue.h --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -110,7 +110,7 @@ * _INSERT_TAIL - - + + * _CONCAT s s + + * _REMOVE_AFTER + - + - - * _REMOVE_HEAD + - + - + * _REMOVE_HEAD + + + + * _REMOVE s + s + * _SWAP + + + + * @@ -595,6 +595,9 @@ __containerof((elm)->field.le_prev, \ QUEUE_TYPEOF(type), field.le_next)) +#define LIST_REMOVE_HEAD(head, field) \ + LIST_REMOVE(LIST_FIRST(head), field) + #define LIST_REMOVE(elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.le_next); \ QMD_SAVELINK(oldprev, (elm)->field.le_prev); \ @@ -841,6 +844,9 @@ ((elm)->field.tqe_prev == &(head)->tqh_first ? NULL : \ __containerof((elm)->field.tqe_prev, QUEUE_TYPEOF(type), field.tqe_next)) +#define TAILQ_REMOVE_HEAD(head, field) \ + TAILQ_REMOVE(head, TAILQ_FIRST(head), field) + #define TAILQ_REMOVE(head, elm, field) do { \ QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \