diff options
| -rw-r--r-- | sys/sys/queue.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/queue.h b/sys/sys/queue.h index e90ba3b264f5..b972b263abdf 100644 --- a/sys/sys/queue.h +++ b/sys/sys/queue.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)queue.h 8.5 (Berkeley) 8/20/94 - * $Id: queue.h,v 1.14 1997/04/14 18:22:02 phk Exp $ + * $Id: queue.h,v 1.15 1997/04/27 08:31:17 phk Exp $ */ #ifndef _SYS_QUEUE_H_ @@ -183,6 +183,9 @@ struct { \ (head)->stqh_last = &(head)->stqh_first; \ } +#define STAILQ_FIRST(head) ((head)->stqh_first) +#define STAILQ_LAST(head) (*(head)->stqh_last) + #define STAILQ_INSERT_HEAD(head, elm, field) { \ if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \ (head)->stqh_last = &(elm)->field.stqe_next; \ @@ -201,6 +204,8 @@ struct { \ (tqelm)->field.stqe_next = (elm); \ } +#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next) + #define STAILQ_REMOVE_HEAD(head, field) { \ if (((head)->stqh_first = \ (head)->stqh_first->field.stqe_next) == NULL) \ |
