shqueue.h File Reference
Go to the source code of this file.
Defines
#define
SH_CIRCLEQ_FIRSTP(head, type) ((struct type *)(((u_int8_t *)(head)) + (head)->scqh_first))
#define
SH_CIRCLEQ_LAST(head, type) ((head)->scqh_last == -1 ? (void *)head : SH_CIRCLEQ_LASTP(head, type))
#define
SH_CIRCLEQ_LASTP(head, type) ((struct type *)(((u_int8_t *)(head)) + (head)->scqh_last))
#define
SH_CIRCLEQ_NEXTP(elm, field, type) ((struct type *)(((u_int8_t *)(elm)) + (elm)->field.scqe_next))
#define
SH_CIRCLEQ_PREVP(elm, field, type) ((struct type *)(((u_int8_t *)(elm)) + (elm)->field.scqe_prev))
#define
SH_LIST_FIRSTP(head, type) ((struct type *)(((u_int8_t *)(head)) + (head)->slh_first))
#define
SH_LIST_NEXT_TO_PREV(elm, field) (-(elm)->field.sle_next + SH_PTR_TO_OFF(elm, &(elm)->field.sle_next))
#define
SH_LIST_NEXTP(elm, field, type) ((struct type *)(((u_int8_t *)(elm)) + (elm)->field.sle_next))
#define
SH_LIST_PREV(elm, field) ((ssize_t *)(((u_int8_t *)(elm)) + (elm)->field.sle_prev))
#define
SH_PTR_TO_OFF(src, dest) ((ssize_t)(((u_int8_t *)(dest)) - ((u_int8_t *)(src))))
#define
SH_TAILQ_FIRST(head, type) ((head)->stqh_first == -1 ? NULL : SH_TAILQ_FIRSTP(head, type))
#define
SH_TAILQ_FIRSTP(head, type) ((struct type *)((u_int8_t *)(head) + (head)->stqh_first))
#define
SH_TAILQ_LAST(head) ((ssize_t *)(((u_int8_t *)(head)) + (head)->stqh_last))
#define
SH_TAILQ_NEXT(elm, field, type) ((elm)->field.stqe_next == -1 ? NULL : SH_TAILQ_NEXTP(elm, field, type))
#define
SH_TAILQ_NEXT_TO_PREV(elm, field) (-(elm)->field.stqe_next + SH_PTR_TO_OFF(elm, &(elm)->field.stqe_next))
#define
SH_TAILQ_NEXTP(elm, field, type) ((struct type *)((u_int8_t *)(elm) + (elm)->field.stqe_next))
#define
SH_TAILQ_PREVP(elm, field) ((ssize_t *)((u_int8_t *)(elm) + (elm)->field.stqe_prev))