HPCToolkit
queue.h File Reference
#include <sys/cdefs.h>
Include dependency graph for queue.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define QMD_TRACE_ELEM(elem)
 
#define QMD_TRACE_HEAD(head)
 
#define TRACEBUF
 
#define TRACEBUF_INITIALIZER
 
#define TRASHIT(x)
 
#define QMD_IS_TRASHED(x)   0
 
#define QMD_SAVELINK(name, link)
 
#define QUEUE_TYPEOF(type)   struct type
 
#define SLIST_HEAD(name, type)
 
#define SLIST_CLASS_HEAD(name, type)
 
#define SLIST_HEAD_INITIALIZER(head)   { NULL }
 
#define SLIST_ENTRY(type)
 
#define SLIST_CLASS_ENTRY(type)
 
#define QMD_SLIST_CHECK_PREVPTR(prevp, elm)
 
#define SLIST_CONCAT(head1, head2, type, field)
 
#define SLIST_EMPTY(head)   ((head)->slh_first == NULL)
 
#define SLIST_FIRST(head)   ((head)->slh_first)
 
#define SLIST_FOREACH(var, head, field)
 
#define SLIST_FOREACH_FROM(var, head, field)
 
#define SLIST_FOREACH_SAFE(var, head, field, tvar)
 
#define SLIST_FOREACH_FROM_SAFE(var, head, field, tvar)
 
#define SLIST_FOREACH_PREVPTR(var, varp, head, field)
 
#define SLIST_INIT(head)
 
#define SLIST_INSERT_AFTER(slistelm, elm, field)
 
#define SLIST_INSERT_HEAD(head, elm, field)
 
#define SLIST_NEXT(elm, field)   ((elm)->field.sle_next)
 
#define SLIST_REMOVE(head, elm, type, field)
 
#define SLIST_REMOVE_AFTER(elm, field)
 
#define SLIST_REMOVE_HEAD(head, field)
 
#define SLIST_REMOVE_PREVPTR(prevp, elm, field)
 
#define SLIST_SWAP(head1, head2, type)
 
#define STAILQ_HEAD(name, type)
 
#define STAILQ_CLASS_HEAD(name, type)
 
#define STAILQ_HEAD_INITIALIZER(head)   { NULL, &(head).stqh_first }
 
#define STAILQ_ENTRY(type)
 
#define STAILQ_CLASS_ENTRY(type)
 
#define STAILQ_CONCAT(head1, head2)
 
#define STAILQ_EMPTY(head)   ((head)->stqh_first == NULL)
 
#define STAILQ_FIRST(head)   ((head)->stqh_first)
 
#define STAILQ_FOREACH(var, head, field)
 
#define STAILQ_FOREACH_FROM(var, head, field)
 
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
 
#define STAILQ_FOREACH_FROM_SAFE(var, head, field, tvar)
 
#define STAILQ_INIT(head)
 
#define STAILQ_INSERT_AFTER(head, tqelm, elm, field)
 
#define STAILQ_INSERT_HEAD(head, elm, field)
 
#define STAILQ_INSERT_TAIL(head, elm, field)
 
#define STAILQ_LAST(head, type, field)
 
#define STAILQ_NEXT(elm, field)   ((elm)->field.stqe_next)
 
#define STAILQ_REMOVE(head, elm, type, field)
 
#define STAILQ_REMOVE_AFTER(head, elm, field)
 
#define STAILQ_REMOVE_HEAD(head, field)
 
#define STAILQ_SWAP(head1, head2, type)
 
#define LIST_HEAD(name, type)
 
#define LIST_CLASS_HEAD(name, type)
 
#define LIST_HEAD_INITIALIZER(head)   { NULL }
 
#define LIST_ENTRY(type)
 
#define LIST_CLASS_ENTRY(type)
 
#define QMD_LIST_CHECK_HEAD(head, field)
 
#define QMD_LIST_CHECK_NEXT(elm, field)
 
#define QMD_LIST_CHECK_PREV(elm, field)
 
#define LIST_CONCAT(head1, head2, type, field)
 
#define LIST_EMPTY(head)   ((head)->lh_first == NULL)
 
#define LIST_FIRST(head)   ((head)->lh_first)
 
#define LIST_FOREACH(var, head, field)
 
#define LIST_FOREACH_FROM(var, head, field)
 
#define LIST_FOREACH_SAFE(var, head, field, tvar)
 
#define LIST_FOREACH_FROM_SAFE(var, head, field, tvar)
 
#define LIST_INIT(head)
 
#define LIST_INSERT_AFTER(listelm, elm, field)
 
#define LIST_INSERT_BEFORE(listelm, elm, field)
 
#define LIST_INSERT_HEAD(head, elm, field)
 
#define LIST_NEXT(elm, field)   ((elm)->field.le_next)
 
#define LIST_PREV(elm, head, type, field)
 
#define LIST_REMOVE(elm, field)
 
#define LIST_SWAP(head1, head2, type, field)
 
#define TAILQ_HEAD(name, type)
 
#define TAILQ_CLASS_HEAD(name, type)
 
#define TAILQ_HEAD_INITIALIZER(head)   { NULL, &(head).tqh_first, TRACEBUF_INITIALIZER }
 
#define TAILQ_ENTRY(type)
 
#define TAILQ_CLASS_ENTRY(type)
 
#define QMD_TAILQ_CHECK_HEAD(head, field)
 
#define QMD_TAILQ_CHECK_TAIL(head, headname)
 
#define QMD_TAILQ_CHECK_NEXT(elm, field)
 
#define QMD_TAILQ_CHECK_PREV(elm, field)
 
#define TAILQ_CONCAT(head1, head2, field)
 
#define TAILQ_EMPTY(head)   ((head)->tqh_first == NULL)
 
#define TAILQ_FIRST(head)   ((head)->tqh_first)
 
#define TAILQ_FOREACH(var, head, field)
 
#define TAILQ_FOREACH_FROM(var, head, field)
 
#define TAILQ_FOREACH_SAFE(var, head, field, tvar)
 
#define TAILQ_FOREACH_FROM_SAFE(var, head, field, tvar)
 
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
 
#define TAILQ_FOREACH_REVERSE_FROM(var, head, headname, field)
 
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, tvar)
 
#define TAILQ_FOREACH_REVERSE_FROM_SAFE(var, head, headname, field, tvar)
 
#define TAILQ_INIT(head)
 
#define TAILQ_INSERT_AFTER(head, listelm, elm, field)
 
#define TAILQ_INSERT_BEFORE(listelm, elm, field)
 
#define TAILQ_INSERT_HEAD(head, elm, field)
 
#define TAILQ_INSERT_TAIL(head, elm, field)
 
#define TAILQ_LAST(head, headname)   (*(((struct headname *)((head)->tqh_last))->tqh_last))
 
#define TAILQ_NEXT(elm, field)   ((elm)->field.tqe_next)
 
#define TAILQ_PREV(elm, headname, field)   (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
 
#define TAILQ_REMOVE(head, elm, field)
 
#define TAILQ_SWAP(head1, head2, type, field)
 

Macro Definition Documentation

◆ LIST_CLASS_ENTRY

#define LIST_CLASS_ENTRY (   type)
Value:
struct { \
class type *le_next; /* next element */ \
class type **le_prev; /* address of previous next element */ \
}

Definition at line 464 of file queue.h.

◆ LIST_CLASS_HEAD

#define LIST_CLASS_HEAD (   name,
  type 
)
Value:
struct name { \
class type *lh_first; /* first element */ \
}

Definition at line 450 of file queue.h.

◆ LIST_CONCAT

#define LIST_CONCAT (   head1,
  head2,
  type,
  field 
)
Value:
do { \
QUEUE_TYPEOF(type) *curelm = LIST_FIRST(head1); \
if (curelm == NULL) { \
if ((LIST_FIRST(head1) = LIST_FIRST(head2)) != NULL) { \
LIST_FIRST(head2)->field.le_prev = \
&LIST_FIRST((head1)); \
LIST_INIT(head2); \
} \
} else if (LIST_FIRST(head2) != NULL) { \
while (LIST_NEXT(curelm, field) != NULL) \
curelm = LIST_NEXT(curelm, field); \
LIST_NEXT(curelm, field) = LIST_FIRST(head2); \
LIST_FIRST(head2)->field.le_prev = &LIST_NEXT(curelm, field); \
LIST_INIT(head2); \
} \
} while (0)
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 516 of file queue.h.

◆ LIST_EMPTY

#define LIST_EMPTY (   head)    ((head)->lh_first == NULL)

Definition at line 533 of file queue.h.

◆ LIST_ENTRY

#define LIST_ENTRY (   type)
Value:
struct { \
struct type *le_next; /* next element */ \
struct type **le_prev; /* address of previous next element */ \
}

Definition at line 458 of file queue.h.

◆ LIST_FIRST

#define LIST_FIRST (   head)    ((head)->lh_first)

Definition at line 535 of file queue.h.

◆ LIST_FOREACH

#define LIST_FOREACH (   var,
  head,
  field 
)
Value:
for ((var) = LIST_FIRST((head)); \
(var); \
(var) = LIST_NEXT((var), field))
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586

Definition at line 537 of file queue.h.

◆ LIST_FOREACH_FROM

#define LIST_FOREACH_FROM (   var,
  head,
  field 
)
Value:
for ((var) = ((var) ? (var) : LIST_FIRST((head))); \
(var); \
(var) = LIST_NEXT((var), field))
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586

Definition at line 542 of file queue.h.

◆ LIST_FOREACH_FROM_SAFE

#define LIST_FOREACH_FROM_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = ((var) ? (var) : LIST_FIRST((head))); \
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586

Definition at line 552 of file queue.h.

◆ LIST_FOREACH_SAFE

#define LIST_FOREACH_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = LIST_FIRST((head)); \
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586

Definition at line 547 of file queue.h.

◆ LIST_HEAD

#define LIST_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *lh_first; /* first element */ \
}

Definition at line 445 of file queue.h.

◆ LIST_HEAD_INITIALIZER

#define LIST_HEAD_INITIALIZER (   head)    { NULL }

Definition at line 455 of file queue.h.

◆ LIST_INIT

#define LIST_INIT (   head)
Value:
do { \
LIST_FIRST((head)) = NULL; \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 557 of file queue.h.

◆ LIST_INSERT_AFTER

#define LIST_INSERT_AFTER (   listelm,
  elm,
  field 
)
Value:
do { \
QMD_LIST_CHECK_NEXT(listelm, field); \
if ((LIST_NEXT((elm), field) = LIST_NEXT((listelm), field)) != NULL)\
LIST_NEXT((listelm), field)->field.le_prev = \
&LIST_NEXT((elm), field); \
LIST_NEXT((listelm), field) = (elm); \
(elm)->field.le_prev = &LIST_NEXT((listelm), field); \
} while (0)
#define LIST_NEXT(elm, field)
Definition: queue.h:586
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 561 of file queue.h.

◆ LIST_INSERT_BEFORE

#define LIST_INSERT_BEFORE (   listelm,
  elm,
  field 
)
Value:
do { \
QMD_LIST_CHECK_PREV(listelm, field); \
(elm)->field.le_prev = (listelm)->field.le_prev; \
LIST_NEXT((elm), field) = (listelm); \
*(listelm)->field.le_prev = (elm); \
(listelm)->field.le_prev = &LIST_NEXT((elm), field); \
} while (0)
#define LIST_NEXT(elm, field)
Definition: queue.h:586

Definition at line 570 of file queue.h.

◆ LIST_INSERT_HEAD

#define LIST_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
QMD_LIST_CHECK_HEAD((head), field); \
if ((LIST_NEXT((elm), field) = LIST_FIRST((head))) != NULL) \
LIST_FIRST((head))->field.le_prev = &LIST_NEXT((elm), field);\
LIST_FIRST((head)) = (elm); \
(elm)->field.le_prev = &LIST_FIRST((head)); \
} while (0)
#define LIST_FIRST(head)
Definition: queue.h:535
#define LIST_NEXT(elm, field)
Definition: queue.h:586
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 578 of file queue.h.

◆ LIST_NEXT

#define LIST_NEXT (   elm,
  field 
)    ((elm)->field.le_next)

Definition at line 586 of file queue.h.

◆ LIST_PREV

#define LIST_PREV (   elm,
  head,
  type,
  field 
)
Value:
((elm)->field.le_prev == &LIST_FIRST((head)) ? NULL : \
__containerof((elm)->field.le_prev, \
QUEUE_TYPEOF(type), field.le_next))
#define LIST_FIRST(head)
Definition: queue.h:535
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 588 of file queue.h.

◆ LIST_REMOVE

#define LIST_REMOVE (   elm,
  field 
)
Value:
do { \
QMD_SAVELINK(oldnext, (elm)->field.le_next); \
QMD_SAVELINK(oldprev, (elm)->field.le_prev); \
QMD_LIST_CHECK_NEXT(elm, field); \
QMD_LIST_CHECK_PREV(elm, field); \
if (LIST_NEXT((elm), field) != NULL) \
LIST_NEXT((elm), field)->field.le_prev = \
(elm)->field.le_prev; \
*(elm)->field.le_prev = LIST_NEXT((elm), field); \
TRASHIT(*oldnext); \
TRASHIT(*oldprev); \
} while (0)
#define LIST_NEXT(elm, field)
Definition: queue.h:586
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 593 of file queue.h.

◆ LIST_SWAP

#define LIST_SWAP (   head1,
  head2,
  type,
  field 
)
Value:
do { \
QUEUE_TYPEOF(type) *swap_tmp = LIST_FIRST(head1); \
LIST_FIRST((head1)) = LIST_FIRST((head2)); \
LIST_FIRST((head2)) = swap_tmp; \
if ((swap_tmp = LIST_FIRST((head1))) != NULL) \
swap_tmp->field.le_prev = &LIST_FIRST((head1)); \
if ((swap_tmp = LIST_FIRST((head2))) != NULL) \
swap_tmp->field.le_prev = &LIST_FIRST((head2)); \
} while (0)
#define LIST_FIRST(head)
Definition: queue.h:535
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 606 of file queue.h.

◆ QMD_IS_TRASHED

#define QMD_IS_TRASHED (   x)    0

Definition at line 159 of file queue.h.

◆ QMD_LIST_CHECK_HEAD

#define QMD_LIST_CHECK_HEAD (   head,
  field 
)

Definition at line 511 of file queue.h.

◆ QMD_LIST_CHECK_NEXT

#define QMD_LIST_CHECK_NEXT (   elm,
  field 
)

Definition at line 512 of file queue.h.

◆ QMD_LIST_CHECK_PREV

#define QMD_LIST_CHECK_PREV (   elm,
  field 
)

Definition at line 513 of file queue.h.

◆ QMD_SAVELINK

#define QMD_SAVELINK (   name,
  link 
)

Definition at line 165 of file queue.h.

◆ QMD_SLIST_CHECK_PREVPTR

#define QMD_SLIST_CHECK_PREVPTR (   prevp,
  elm 
)

Definition at line 213 of file queue.h.

◆ QMD_TAILQ_CHECK_HEAD

#define QMD_TAILQ_CHECK_HEAD (   head,
  field 
)

Definition at line 700 of file queue.h.

◆ QMD_TAILQ_CHECK_NEXT

#define QMD_TAILQ_CHECK_NEXT (   elm,
  field 
)

Definition at line 702 of file queue.h.

◆ QMD_TAILQ_CHECK_PREV

#define QMD_TAILQ_CHECK_PREV (   elm,
  field 
)

Definition at line 703 of file queue.h.

◆ QMD_TAILQ_CHECK_TAIL

#define QMD_TAILQ_CHECK_TAIL (   head,
  headname 
)

Definition at line 701 of file queue.h.

◆ QMD_TRACE_ELEM

#define QMD_TRACE_ELEM (   elem)

Definition at line 148 of file queue.h.

◆ QMD_TRACE_HEAD

#define QMD_TRACE_HEAD (   head)

Definition at line 149 of file queue.h.

◆ QUEUE_TYPEOF

#define QUEUE_TYPEOF (   type)    struct type

Definition at line 174 of file queue.h.

◆ SLIST_CLASS_ENTRY

#define SLIST_CLASS_ENTRY (   type)
Value:
struct { \
class type *sle_next; /* next element */ \
}

Definition at line 198 of file queue.h.

◆ SLIST_CLASS_HEAD

#define SLIST_CLASS_HEAD (   name,
  type 
)
Value:
struct name { \
class type *slh_first; /* first element */ \
}

Definition at line 185 of file queue.h.

◆ SLIST_CONCAT

#define SLIST_CONCAT (   head1,
  head2,
  type,
  field 
)
Value:
do { \
QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head1); \
if (curelm == NULL) { \
if ((SLIST_FIRST(head1) = SLIST_FIRST(head2)) != NULL) \
SLIST_INIT(head2); \
} else if (SLIST_FIRST(head2) != NULL) { \
while (SLIST_NEXT(curelm, field) != NULL) \
curelm = SLIST_NEXT(curelm, field); \
SLIST_NEXT(curelm, field) = SLIST_FIRST(head2); \
SLIST_INIT(head2); \
} \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 216 of file queue.h.

◆ SLIST_EMPTY

#define SLIST_EMPTY (   head)    ((head)->slh_first == NULL)

Definition at line 229 of file queue.h.

◆ SLIST_ENTRY

#define SLIST_ENTRY (   type)
Value:
struct { \
struct type *sle_next; /* next element */ \
}

Definition at line 193 of file queue.h.

◆ SLIST_FIRST

#define SLIST_FIRST (   head)    ((head)->slh_first)

Definition at line 231 of file queue.h.

◆ SLIST_FOREACH

#define SLIST_FOREACH (   var,
  head,
  field 
)
Value:
for ((var) = SLIST_FIRST((head)); \
(var); \
(var) = SLIST_NEXT((var), field))
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 233 of file queue.h.

◆ SLIST_FOREACH_FROM

#define SLIST_FOREACH_FROM (   var,
  head,
  field 
)
Value:
for ((var) = ((var) ? (var) : SLIST_FIRST((head))); \
(var); \
(var) = SLIST_NEXT((var), field))
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 238 of file queue.h.

◆ SLIST_FOREACH_FROM_SAFE

#define SLIST_FOREACH_FROM_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = ((var) ? (var) : SLIST_FIRST((head))); \
(var) && ((tvar) = SLIST_NEXT((var), field), 1); \
(var) = (tvar))
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 248 of file queue.h.

◆ SLIST_FOREACH_PREVPTR

#define SLIST_FOREACH_PREVPTR (   var,
  varp,
  head,
  field 
)
Value:
for ((varp) = &SLIST_FIRST((head)); \
((var) = *(varp)) != NULL; \
(varp) = &SLIST_NEXT((var), field))
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 253 of file queue.h.

◆ SLIST_FOREACH_SAFE

#define SLIST_FOREACH_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = SLIST_FIRST((head)); \
(var) && ((tvar) = SLIST_NEXT((var), field), 1); \
(var) = (tvar))
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 243 of file queue.h.

◆ SLIST_HEAD

#define SLIST_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *slh_first; /* first element */ \
}

Definition at line 180 of file queue.h.

◆ SLIST_HEAD_INITIALIZER

#define SLIST_HEAD_INITIALIZER (   head)    { NULL }

Definition at line 190 of file queue.h.

◆ SLIST_INIT

#define SLIST_INIT (   head)
Value:
do { \
SLIST_FIRST((head)) = NULL; \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 258 of file queue.h.

◆ SLIST_INSERT_AFTER

#define SLIST_INSERT_AFTER (   slistelm,
  elm,
  field 
)
Value:
do { \
SLIST_NEXT((elm), field) = SLIST_NEXT((slistelm), field); \
SLIST_NEXT((slistelm), field) = (elm); \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272

Definition at line 262 of file queue.h.

◆ SLIST_INSERT_HEAD

#define SLIST_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
SLIST_NEXT((elm), field) = SLIST_FIRST((head)); \
SLIST_FIRST((head)) = (elm); \
} while (0)
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 267 of file queue.h.

◆ SLIST_NEXT

#define SLIST_NEXT (   elm,
  field 
)    ((elm)->field.sle_next)

Definition at line 272 of file queue.h.

◆ SLIST_REMOVE

#define SLIST_REMOVE (   head,
  elm,
  type,
  field 
)
Value:
do { \
QMD_SAVELINK(oldnext, (elm)->field.sle_next); \
if (SLIST_FIRST((head)) == (elm)) { \
SLIST_REMOVE_HEAD((head), field); \
} \
else { \
QUEUE_TYPEOF(type) *curelm = SLIST_FIRST(head); \
while (SLIST_NEXT(curelm, field) != (elm)) \
curelm = SLIST_NEXT(curelm, field); \
SLIST_REMOVE_AFTER(curelm, field); \
} \
TRASHIT(*oldnext); \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 274 of file queue.h.

◆ SLIST_REMOVE_AFTER

#define SLIST_REMOVE_AFTER (   elm,
  field 
)
Value:
do { \
SLIST_NEXT(elm, field) = \
SLIST_NEXT(SLIST_NEXT(elm, field), field); \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272

Definition at line 288 of file queue.h.

◆ SLIST_REMOVE_HEAD

#define SLIST_REMOVE_HEAD (   head,
  field 
)
Value:
do { \
SLIST_FIRST((head)) = SLIST_NEXT(SLIST_FIRST((head)), field); \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 293 of file queue.h.

◆ SLIST_REMOVE_PREVPTR

#define SLIST_REMOVE_PREVPTR (   prevp,
  elm,
  field 
)
Value:
do { \
QMD_SLIST_CHECK_PREVPTR(prevp, elm); \
*(prevp) = SLIST_NEXT(elm, field); \
TRASHIT((elm)->field.sle_next); \
} while (0)
#define SLIST_NEXT(elm, field)
Definition: queue.h:272

Definition at line 297 of file queue.h.

◆ SLIST_SWAP

#define SLIST_SWAP (   head1,
  head2,
  type 
)
Value:
do { \
QUEUE_TYPEOF(type) *swap_first = SLIST_FIRST(head1); \
SLIST_FIRST(head1) = SLIST_FIRST(head2); \
SLIST_FIRST(head2) = swap_first; \
} while (0)
#define SLIST_FIRST(head)
Definition: queue.h:231

Definition at line 303 of file queue.h.

◆ STAILQ_CLASS_ENTRY

#define STAILQ_CLASS_ENTRY (   type)
Value:
struct { \
class type *stqe_next; /* next element */ \
}

Definition at line 332 of file queue.h.

◆ STAILQ_CLASS_HEAD

#define STAILQ_CLASS_HEAD (   name,
  type 
)
Value:
struct name { \
class type *stqh_first; /* first element */ \
class type **stqh_last; /* addr of last next element */ \
}

Definition at line 318 of file queue.h.

◆ STAILQ_CONCAT

#define STAILQ_CONCAT (   head1,
  head2 
)
Value:
do { \
if (!STAILQ_EMPTY((head2))) { \
*(head1)->stqh_last = (head2)->stqh_first; \
(head1)->stqh_last = (head2)->stqh_last; \
STAILQ_INIT((head2)); \
} \
} while (0)
#define STAILQ_EMPTY(head)
Definition: queue.h:348

Definition at line 340 of file queue.h.

◆ STAILQ_EMPTY

#define STAILQ_EMPTY (   head)    ((head)->stqh_first == NULL)

Definition at line 348 of file queue.h.

◆ STAILQ_ENTRY

#define STAILQ_ENTRY (   type)
Value:
struct { \
struct type *stqe_next; /* next element */ \
}

Definition at line 327 of file queue.h.

◆ STAILQ_FIRST

#define STAILQ_FIRST (   head)    ((head)->stqh_first)

Definition at line 350 of file queue.h.

◆ STAILQ_FOREACH

#define STAILQ_FOREACH (   var,
  head,
  field 
)
Value:
for((var) = STAILQ_FIRST((head)); \
(var); \
(var) = STAILQ_NEXT((var), field))
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 352 of file queue.h.

◆ STAILQ_FOREACH_FROM

#define STAILQ_FOREACH_FROM (   var,
  head,
  field 
)
Value:
for ((var) = ((var) ? (var) : STAILQ_FIRST((head))); \
(var); \
(var) = STAILQ_NEXT((var), field))
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 357 of file queue.h.

◆ STAILQ_FOREACH_FROM_SAFE

#define STAILQ_FOREACH_FROM_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = ((var) ? (var) : STAILQ_FIRST((head))); \
(var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 367 of file queue.h.

◆ STAILQ_FOREACH_SAFE

#define STAILQ_FOREACH_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = STAILQ_FIRST((head)); \
(var) && ((tvar) = STAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 362 of file queue.h.

◆ STAILQ_HEAD

#define STAILQ_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *stqh_first;/* first element */ \
struct type **stqh_last;/* addr of last next element */ \
}

Definition at line 312 of file queue.h.

◆ STAILQ_HEAD_INITIALIZER

#define STAILQ_HEAD_INITIALIZER (   head)    { NULL, &(head).stqh_first }

Definition at line 324 of file queue.h.

◆ STAILQ_INIT

#define STAILQ_INIT (   head)
Value:
do { \
STAILQ_FIRST((head)) = NULL; \
(head)->stqh_last = &STAILQ_FIRST((head)); \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 372 of file queue.h.

◆ STAILQ_INSERT_AFTER

#define STAILQ_INSERT_AFTER (   head,
  tqelm,
  elm,
  field 
)
Value:
do { \
if ((STAILQ_NEXT((elm), field) = STAILQ_NEXT((tqelm), field)) == NULL)\
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
STAILQ_NEXT((tqelm), field) = (elm); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 377 of file queue.h.

◆ STAILQ_INSERT_HEAD

#define STAILQ_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
if ((STAILQ_NEXT((elm), field) = STAILQ_FIRST((head))) == NULL) \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
STAILQ_FIRST((head)) = (elm); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define NULL
Definition: ElfHelper.cpp:85
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 383 of file queue.h.

◆ STAILQ_INSERT_TAIL

#define STAILQ_INSERT_TAIL (   head,
  elm,
  field 
)
Value:
do { \
STAILQ_NEXT((elm), field) = NULL; \
*(head)->stqh_last = (elm); \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 389 of file queue.h.

◆ STAILQ_LAST

#define STAILQ_LAST (   head,
  type,
  field 
)
Value:
(STAILQ_EMPTY((head)) ? NULL : \
__containerof((head)->stqh_last, \
QUEUE_TYPEOF(type), field.stqe_next))
#define NULL
Definition: ElfHelper.cpp:85
#define STAILQ_EMPTY(head)
Definition: queue.h:348
#define QUEUE_TYPEOF(type)
Definition: queue.h:174

Definition at line 395 of file queue.h.

◆ STAILQ_NEXT

#define STAILQ_NEXT (   elm,
  field 
)    ((elm)->field.stqe_next)

Definition at line 400 of file queue.h.

◆ STAILQ_REMOVE

#define STAILQ_REMOVE (   head,
  elm,
  type,
  field 
)
Value:
do { \
QMD_SAVELINK(oldnext, (elm)->field.stqe_next); \
if (STAILQ_FIRST((head)) == (elm)) { \
STAILQ_REMOVE_HEAD((head), field); \
} \
else { \
QUEUE_TYPEOF(type) *curelm = STAILQ_FIRST(head); \
while (STAILQ_NEXT(curelm, field) != (elm)) \
curelm = STAILQ_NEXT(curelm, field); \
STAILQ_REMOVE_AFTER(head, curelm, field); \
} \
TRASHIT(*oldnext); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 402 of file queue.h.

◆ STAILQ_REMOVE_AFTER

#define STAILQ_REMOVE_AFTER (   head,
  elm,
  field 
)
Value:
do { \
if ((STAILQ_NEXT(elm, field) = \
STAILQ_NEXT(STAILQ_NEXT(elm, field), field)) == NULL) \
(head)->stqh_last = &STAILQ_NEXT((elm), field); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 416 of file queue.h.

◆ STAILQ_REMOVE_HEAD

#define STAILQ_REMOVE_HEAD (   head,
  field 
)
Value:
do { \
if ((STAILQ_FIRST((head)) = \
STAILQ_NEXT(STAILQ_FIRST((head)), field)) == NULL) \
(head)->stqh_last = &STAILQ_FIRST((head)); \
} while (0)
#define STAILQ_NEXT(elm, field)
Definition: queue.h:400
#define NULL
Definition: ElfHelper.cpp:85
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 422 of file queue.h.

◆ STAILQ_SWAP

#define STAILQ_SWAP (   head1,
  head2,
  type 
)
Value:
do { \
QUEUE_TYPEOF(type) *swap_first = STAILQ_FIRST(head1); \
QUEUE_TYPEOF(type) **swap_last = (head1)->stqh_last; \
STAILQ_FIRST(head1) = STAILQ_FIRST(head2); \
(head1)->stqh_last = (head2)->stqh_last; \
STAILQ_FIRST(head2) = swap_first; \
(head2)->stqh_last = swap_last; \
if (STAILQ_EMPTY(head1)) \
(head1)->stqh_last = &STAILQ_FIRST(head1); \
if (STAILQ_EMPTY(head2)) \
(head2)->stqh_last = &STAILQ_FIRST(head2); \
} while (0)
#define STAILQ_EMPTY(head)
Definition: queue.h:348
#define STAILQ_FIRST(head)
Definition: queue.h:350

Definition at line 428 of file queue.h.

◆ TAILQ_CLASS_ENTRY

#define TAILQ_CLASS_ENTRY (   type)
Value:
struct { \
class type *tqe_next; /* next element */ \
class type **tqe_prev; /* address of previous next element */ \
TRACEBUF \
}

Definition at line 643 of file queue.h.

◆ TAILQ_CLASS_HEAD

#define TAILQ_CLASS_HEAD (   name,
  type 
)
Value:
struct name { \
class type *tqh_first; /* first element */ \
class type **tqh_last; /* addr of last next element */ \
TRACEBUF \
}

Definition at line 626 of file queue.h.

◆ TAILQ_CONCAT

#define TAILQ_CONCAT (   head1,
  head2,
  field 
)
Value:
do { \
if (!TAILQ_EMPTY(head2)) { \
*(head1)->tqh_last = (head2)->tqh_first; \
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
(head1)->tqh_last = (head2)->tqh_last; \
TAILQ_INIT((head2)); \
QMD_TRACE_HEAD(head1); \
QMD_TRACE_HEAD(head2); \
} \
} while (0)
#define TAILQ_EMPTY(head)
Definition: queue.h:717

Definition at line 706 of file queue.h.

◆ TAILQ_EMPTY

#define TAILQ_EMPTY (   head)    ((head)->tqh_first == NULL)

Definition at line 717 of file queue.h.

◆ TAILQ_ENTRY

#define TAILQ_ENTRY (   type)
Value:
struct { \
struct type *tqe_next; /* next element */ \
struct type **tqe_prev; /* address of previous next element */ \
TRACEBUF \
}

Definition at line 636 of file queue.h.

◆ TAILQ_FIRST

#define TAILQ_FIRST (   head)    ((head)->tqh_first)

Definition at line 719 of file queue.h.

◆ TAILQ_FOREACH

#define TAILQ_FOREACH (   var,
  head,
  field 
)
Value:
for ((var) = TAILQ_FIRST((head)); \
(var); \
(var) = TAILQ_NEXT((var), field))
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 721 of file queue.h.

◆ TAILQ_FOREACH_FROM

#define TAILQ_FOREACH_FROM (   var,
  head,
  field 
)
Value:
for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \
(var); \
(var) = TAILQ_NEXT((var), field))
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 726 of file queue.h.

◆ TAILQ_FOREACH_FROM_SAFE

#define TAILQ_FOREACH_FROM_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = ((var) ? (var) : TAILQ_FIRST((head))); \
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 736 of file queue.h.

◆ TAILQ_FOREACH_REVERSE

#define TAILQ_FOREACH_REVERSE (   var,
  head,
  headname,
  field 
)
Value:
for ((var) = TAILQ_LAST((head), headname); \
(var); \
(var) = TAILQ_PREV((var), headname, field))
#define TAILQ_LAST(head, headname)
Definition: queue.h:815
#define TAILQ_PREV(elm, headname, field)
Definition: queue.h:820

Definition at line 741 of file queue.h.

◆ TAILQ_FOREACH_REVERSE_FROM

#define TAILQ_FOREACH_REVERSE_FROM (   var,
  head,
  headname,
  field 
)
Value:
for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \
(var); \
(var) = TAILQ_PREV((var), headname, field))
#define TAILQ_LAST(head, headname)
Definition: queue.h:815
#define TAILQ_PREV(elm, headname, field)
Definition: queue.h:820

Definition at line 746 of file queue.h.

◆ TAILQ_FOREACH_REVERSE_FROM_SAFE

#define TAILQ_FOREACH_REVERSE_FROM_SAFE (   var,
  head,
  headname,
  field,
  tvar 
)
Value:
for ((var) = ((var) ? (var) : TAILQ_LAST((head), headname)); \
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
#define TAILQ_LAST(head, headname)
Definition: queue.h:815
#define TAILQ_PREV(elm, headname, field)
Definition: queue.h:820

Definition at line 756 of file queue.h.

◆ TAILQ_FOREACH_REVERSE_SAFE

#define TAILQ_FOREACH_REVERSE_SAFE (   var,
  head,
  headname,
  field,
  tvar 
)
Value:
for ((var) = TAILQ_LAST((head), headname); \
(var) && ((tvar) = TAILQ_PREV((var), headname, field), 1); \
(var) = (tvar))
#define TAILQ_LAST(head, headname)
Definition: queue.h:815
#define TAILQ_PREV(elm, headname, field)
Definition: queue.h:820

Definition at line 751 of file queue.h.

◆ TAILQ_FOREACH_SAFE

#define TAILQ_FOREACH_SAFE (   var,
  head,
  field,
  tvar 
)
Value:
for ((var) = TAILQ_FIRST((head)); \
(var) && ((tvar) = TAILQ_NEXT((var), field), 1); \
(var) = (tvar))
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 731 of file queue.h.

◆ TAILQ_HEAD

#define TAILQ_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *tqh_first; /* first element */ \
struct type **tqh_last; /* addr of last next element */ \
TRACEBUF \
}

Definition at line 619 of file queue.h.

◆ TAILQ_HEAD_INITIALIZER

#define TAILQ_HEAD_INITIALIZER (   head)    { NULL, &(head).tqh_first, TRACEBUF_INITIALIZER }

Definition at line 633 of file queue.h.

◆ TAILQ_INIT

#define TAILQ_INIT (   head)
Value:
do { \
TAILQ_FIRST((head)) = NULL; \
(head)->tqh_last = &TAILQ_FIRST((head)); \
QMD_TRACE_HEAD(head); \
} while (0)
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 761 of file queue.h.

◆ TAILQ_INSERT_AFTER

#define TAILQ_INSERT_AFTER (   head,
  listelm,
  elm,
  field 
)
Value:
do { \
QMD_TAILQ_CHECK_NEXT(listelm, field); \
if ((TAILQ_NEXT((elm), field) = TAILQ_NEXT((listelm), field)) != NULL)\
TAILQ_NEXT((elm), field)->field.tqe_prev = \
&TAILQ_NEXT((elm), field); \
else { \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
QMD_TRACE_HEAD(head); \
} \
TAILQ_NEXT((listelm), field) = (elm); \
(elm)->field.tqe_prev = &TAILQ_NEXT((listelm), field); \
QMD_TRACE_ELEM(&(elm)->field); \
QMD_TRACE_ELEM(&(listelm)->field); \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 767 of file queue.h.

◆ TAILQ_INSERT_BEFORE

#define TAILQ_INSERT_BEFORE (   listelm,
  elm,
  field 
)
Value:
do { \
QMD_TAILQ_CHECK_PREV(listelm, field); \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
TAILQ_NEXT((elm), field) = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &TAILQ_NEXT((elm), field); \
QMD_TRACE_ELEM(&(elm)->field); \
QMD_TRACE_ELEM(&(listelm)->field); \
} while (0)
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 782 of file queue.h.

◆ TAILQ_INSERT_HEAD

#define TAILQ_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
QMD_TAILQ_CHECK_HEAD(head, field); \
if ((TAILQ_NEXT((elm), field) = TAILQ_FIRST((head))) != NULL) \
TAILQ_FIRST((head))->field.tqe_prev = \
&TAILQ_NEXT((elm), field); \
else \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
TAILQ_FIRST((head)) = (elm); \
(elm)->field.tqe_prev = &TAILQ_FIRST((head)); \
QMD_TRACE_HEAD(head); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define TAILQ_FIRST(head)
Definition: queue.h:719
#define NULL
Definition: ElfHelper.cpp:85
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 792 of file queue.h.

◆ TAILQ_INSERT_TAIL

#define TAILQ_INSERT_TAIL (   head,
  elm,
  field 
)
Value:
do { \
QMD_TAILQ_CHECK_TAIL(head, field); \
TAILQ_NEXT((elm), field) = NULL; \
(elm)->field.tqe_prev = (head)->tqh_last; \
*(head)->tqh_last = (elm); \
(head)->tqh_last = &TAILQ_NEXT((elm), field); \
QMD_TRACE_HEAD(head); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 805 of file queue.h.

◆ TAILQ_LAST

#define TAILQ_LAST (   head,
  headname 
)    (*(((struct headname *)((head)->tqh_last))->tqh_last))

Definition at line 815 of file queue.h.

◆ TAILQ_NEXT

#define TAILQ_NEXT (   elm,
  field 
)    ((elm)->field.tqe_next)

Definition at line 818 of file queue.h.

◆ TAILQ_PREV

#define TAILQ_PREV (   elm,
  headname,
  field 
)    (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))

Definition at line 820 of file queue.h.

◆ TAILQ_REMOVE

#define TAILQ_REMOVE (   head,
  elm,
  field 
)
Value:
do { \
QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \
QMD_SAVELINK(oldprev, (elm)->field.tqe_prev); \
QMD_TAILQ_CHECK_NEXT(elm, field); \
QMD_TAILQ_CHECK_PREV(elm, field); \
if ((TAILQ_NEXT((elm), field)) != NULL) \
TAILQ_NEXT((elm), field)->field.tqe_prev = \
(elm)->field.tqe_prev; \
else { \
(head)->tqh_last = (elm)->field.tqe_prev; \
QMD_TRACE_HEAD(head); \
} \
*(elm)->field.tqe_prev = TAILQ_NEXT((elm), field); \
TRASHIT(*oldnext); \
TRASHIT(*oldprev); \
QMD_TRACE_ELEM(&(elm)->field); \
} while (0)
#define QMD_TRACE_HEAD(head)
Definition: queue.h:149
#define NULL
Definition: ElfHelper.cpp:85
#define TAILQ_NEXT(elm, field)
Definition: queue.h:818

Definition at line 823 of file queue.h.

◆ TAILQ_SWAP

#define TAILQ_SWAP (   head1,
  head2,
  type,
  field 
)
Value:
do { \
QUEUE_TYPEOF(type) *swap_first = (head1)->tqh_first; \
QUEUE_TYPEOF(type) **swap_last = (head1)->tqh_last; \
(head1)->tqh_first = (head2)->tqh_first; \
(head1)->tqh_last = (head2)->tqh_last; \
(head2)->tqh_first = swap_first; \
(head2)->tqh_last = swap_last; \
if ((swap_first = (head1)->tqh_first) != NULL) \
swap_first->field.tqe_prev = &(head1)->tqh_first; \
else \
(head1)->tqh_last = &(head1)->tqh_first; \
if ((swap_first = (head2)->tqh_first) != NULL) \
swap_first->field.tqe_prev = &(head2)->tqh_first; \
else \
(head2)->tqh_last = &(head2)->tqh_first; \
} while (0)
#define NULL
Definition: ElfHelper.cpp:85

Definition at line 841 of file queue.h.

◆ TRACEBUF

#define TRACEBUF

Definition at line 150 of file queue.h.

◆ TRACEBUF_INITIALIZER

#define TRACEBUF_INITIALIZER

Definition at line 151 of file queue.h.

◆ TRASHIT

#define TRASHIT (   x)

Definition at line 158 of file queue.h.