Asterisk - The Open Source Telephony Project  18.5.0
Macros
queue.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CIRCLEQ_EMPTY(head)   ((head)->cqh_first == (void *)(head))
 
#define CIRCLEQ_ENTRY(type)
 
#define CIRCLEQ_FIRST(head)   ((head)->cqh_first)
 
#define CIRCLEQ_FOREACH(var, head, field)
 
#define CIRCLEQ_FOREACH_REVERSE(var, head, field)
 
#define CIRCLEQ_HEAD(name, type)
 
#define CIRCLEQ_INIT(head)
 
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field)
 
#define CIRCLEQ_INSERT_BEFORE(head, listelm, elm, field)
 
#define CIRCLEQ_INSERT_HEAD(head, elm, field)
 
#define CIRCLEQ_INSERT_TAIL(head, elm, field)
 
#define CIRCLEQ_LAST(head)   ((head)->cqh_last)
 
#define CIRCLEQ_NEXT(elm, field)   ((elm)->field.cqe_next)
 
#define CIRCLEQ_PREV(elm, field)   ((elm)->field.cqe_prev)
 
#define CIRCLEQ_REMOVE(head, elm, field)
 
#define LIST_EMPTY(head)   ((head)->lh_first == NULL)
 
#define LIST_ENTRY(type)
 
#define LIST_FIRST(head)   ((head)->lh_first)
 
#define LIST_FOREACH(var, head, field)   for((var) = (head)->lh_first; (var); (var) = (var)->field.le_next)
 
#define LIST_HEAD(name, type)
 
#define LIST_HEAD_INITIALIZER(head)   { NULL }
 
#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_REMOVE(elm, field)
 
#define SLIST_EMPTY(head)   ((head)->slh_first == NULL)
 
#define SLIST_ENTRY(type)
 
#define SLIST_FIRST(head)   ((head)->slh_first)
 
#define SLIST_FOREACH(var, head, field)   for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
 
#define SLIST_HEAD(name, type)
 
#define SLIST_HEAD_INITIALIZER(head)   { NULL }
 
#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_HEAD(head, field)
 
#define STAILQ_EMPTY(head)   ((head)->stqh_first == NULL)
 
#define STAILQ_ENTRY(type)
 
#define STAILQ_FIRST(head)   ((head)->stqh_first)
 
#define STAILQ_FOREACH(var, head, field)   for((var) = (head)->stqh_first; (var); (var) = (var)->field.stqe_next)
 
#define STAILQ_HEAD(name, type)
 
#define STAILQ_HEAD_INITIALIZER(head)   { NULL, &(head).stqh_first }
 
#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)   (*(head)->stqh_last)
 
#define STAILQ_NEXT(elm, field)   ((elm)->field.stqe_next)
 
#define STAILQ_REMOVE(head, elm, type, field)
 
#define STAILQ_REMOVE_HEAD(head, field)
 
#define STAILQ_REMOVE_HEAD_UNTIL(head, elm, field)
 
#define TAILQ_EMPTY(head)   ((head)->tqh_first == NULL)
 
#define TAILQ_ENTRY(type)
 
#define TAILQ_FIRST(head)   ((head)->tqh_first)
 
#define TAILQ_FOREACH(var, head, field)   for (var = TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))
 
#define TAILQ_FOREACH_REVERSE(var, head, headname, field)
 
#define TAILQ_HEAD(name, type)
 
#define TAILQ_HEAD_INITIALIZER(head)   { NULL, &(head).tqh_first }
 
#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)
 

Macro Definition Documentation

◆ CIRCLEQ_EMPTY

#define CIRCLEQ_EMPTY (   head)    ((head)->cqh_first == (void *)(head))

Definition at line 417 of file queue.h.

◆ CIRCLEQ_ENTRY

#define CIRCLEQ_ENTRY (   type)
Value:
struct { \
struct type *cqe_next; /* next element */ \
struct type *cqe_prev; /* previous element */ \
}
ael_priority_type type
Definition: ael_structs.h:90

Definition at line 408 of file queue.h.

◆ CIRCLEQ_FIRST

#define CIRCLEQ_FIRST (   head)    ((head)->cqh_first)

Definition at line 419 of file queue.h.

◆ CIRCLEQ_FOREACH

#define CIRCLEQ_FOREACH (   var,
  head,
  field 
)
Value:
for((var) = (head)->cqh_first; \
(var) != (void *)(head); \
(var) = (var)->field.cqe_next)
#define var
Definition: ast_expr2f.c:614

Definition at line 421 of file queue.h.

◆ CIRCLEQ_FOREACH_REVERSE

#define CIRCLEQ_FOREACH_REVERSE (   var,
  head,
  field 
)
Value:
for((var) = (head)->cqh_last; \
(var) != (void *)(head); \
(var) = (var)->field.cqe_prev)
#define var
Definition: ast_expr2f.c:614

Definition at line 426 of file queue.h.

◆ CIRCLEQ_HEAD

#define CIRCLEQ_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *cqh_first; /* first element */ \
struct type *cqh_last; /* last element */ \
}
static const char type[]
Definition: chan_ooh323.c:109
static const char name[]
Definition: cdr_mysql.c:74

Definition at line 402 of file queue.h.

◆ CIRCLEQ_INIT

#define CIRCLEQ_INIT (   head)
Value:
do { \
(head)->cqh_first = (void *)(head); \
(head)->cqh_last = (void *)(head); \
} while (0)

Definition at line 431 of file queue.h.

Referenced by mpool_open().

◆ CIRCLEQ_INSERT_AFTER

#define CIRCLEQ_INSERT_AFTER (   head,
  listelm,
  elm,
  field 
)

Definition at line 436 of file queue.h.

◆ CIRCLEQ_INSERT_BEFORE

#define CIRCLEQ_INSERT_BEFORE (   head,
  listelm,
  elm,
  field 
)

Definition at line 446 of file queue.h.

◆ CIRCLEQ_INSERT_HEAD

#define CIRCLEQ_INSERT_HEAD (   head,
  elm,
  field 
)

Definition at line 456 of file queue.h.

Referenced by mpool_get(), and mpool_new().

◆ CIRCLEQ_INSERT_TAIL

#define CIRCLEQ_INSERT_TAIL (   head,
  elm,
  field 
)

Definition at line 466 of file queue.h.

Referenced by mpool_get(), and mpool_new().

◆ CIRCLEQ_LAST

#define CIRCLEQ_LAST (   head)    ((head)->cqh_last)

Definition at line 476 of file queue.h.

◆ CIRCLEQ_NEXT

#define CIRCLEQ_NEXT (   elm,
  field 
)    ((elm)->field.cqe_next)

Definition at line 478 of file queue.h.

◆ CIRCLEQ_PREV

#define CIRCLEQ_PREV (   elm,
  field 
)    ((elm)->field.cqe_prev)

Definition at line 480 of file queue.h.

◆ CIRCLEQ_REMOVE

#define CIRCLEQ_REMOVE (   head,
  elm,
  field 
)

Definition at line 482 of file queue.h.

Referenced by mpool_bkt(), mpool_close(), and mpool_get().

◆ LIST_EMPTY

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

Definition at line 268 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 */ \
}
static const char type[]
Definition: chan_ooh323.c:109

Definition at line 258 of file queue.h.

◆ LIST_FIRST

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

Definition at line 270 of file queue.h.

◆ LIST_FOREACH

#define LIST_FOREACH (   var,
  head,
  field 
)    for((var) = (head)->lh_first; (var); (var) = (var)->field.le_next)

Definition at line 272 of file queue.h.

◆ LIST_HEAD

#define LIST_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *lh_first; /* first element */ \
}
static const char type[]
Definition: chan_ooh323.c:109
static const char name[]
Definition: cdr_mysql.c:74

Definition at line 250 of file queue.h.

◆ LIST_HEAD_INITIALIZER

#define LIST_HEAD_INITIALIZER (   head)    { NULL }

Definition at line 255 of file queue.h.

◆ LIST_INIT

#define LIST_INIT (   head)
Value:
do { \
(head)->lh_first = NULL; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 275 of file queue.h.

◆ LIST_INSERT_AFTER

#define LIST_INSERT_AFTER (   listelm,
  elm,
  field 
)

Definition at line 279 of file queue.h.

◆ LIST_INSERT_BEFORE

#define LIST_INSERT_BEFORE (   listelm,
  elm,
  field 
)

Definition at line 287 of file queue.h.

◆ LIST_INSERT_HEAD

#define LIST_INSERT_HEAD (   head,
  elm,
  field 
)

Definition at line 294 of file queue.h.

◆ LIST_NEXT

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

Definition at line 301 of file queue.h.

◆ LIST_REMOVE

#define LIST_REMOVE (   elm,
  field 
)

Definition at line 303 of file queue.h.

◆ SLIST_EMPTY

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

Definition at line 129 of file queue.h.

◆ SLIST_ENTRY

#define SLIST_ENTRY (   type)
Value:
struct { \
struct type *sle_next; /* next element */ \
}
static const char type[]
Definition: chan_ooh323.c:109

Definition at line 121 of file queue.h.

◆ SLIST_FIRST

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

Definition at line 131 of file queue.h.

◆ SLIST_FOREACH

#define SLIST_FOREACH (   var,
  head,
  field 
)    for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)

Definition at line 133 of file queue.h.

◆ SLIST_HEAD

#define SLIST_HEAD (   name,
  type 
)
Value:
struct name { \
struct type *slh_first; /* first element */ \
}
static const char type[]
Definition: chan_ooh323.c:109
static const char name[]
Definition: cdr_mysql.c:74

Definition at line 113 of file queue.h.

◆ SLIST_HEAD_INITIALIZER

#define SLIST_HEAD_INITIALIZER (   head)    { NULL }

Definition at line 118 of file queue.h.

◆ SLIST_INIT

#define SLIST_INIT (   head)
Value:
{ \
(head)->slh_first = NULL; \
}
#define NULL
Definition: resample.c:96

Definition at line 136 of file queue.h.

◆ SLIST_INSERT_AFTER

#define SLIST_INSERT_AFTER (   slistelm,
  elm,
  field 
)
Value:
do { \
(elm)->field.sle_next = (slistelm)->field.sle_next; \
(slistelm)->field.sle_next = (elm); \
} while (0)

Definition at line 140 of file queue.h.

◆ SLIST_INSERT_HEAD

#define SLIST_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
(elm)->field.sle_next = (head)->slh_first; \
(head)->slh_first = (elm); \
} while (0)

Definition at line 145 of file queue.h.

◆ SLIST_NEXT

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

Definition at line 150 of file queue.h.

◆ SLIST_REMOVE

#define SLIST_REMOVE (   head,
  elm,
  type,
  field 
)

Definition at line 156 of file queue.h.

◆ SLIST_REMOVE_HEAD

#define SLIST_REMOVE_HEAD (   head,
  field 
)
Value:
do { \
(head)->slh_first = (head)->slh_first->field.sle_next; \
} while (0)

Definition at line 152 of file queue.h.

◆ STAILQ_EMPTY

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

Definition at line 189 of file queue.h.

◆ STAILQ_ENTRY

#define STAILQ_ENTRY (   type)
Value:
struct { \
struct type *stqe_next; /* next element */ \
}
static const char type[]
Definition: chan_ooh323.c:109

Definition at line 181 of file queue.h.

◆ STAILQ_FIRST

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

Definition at line 196 of file queue.h.

◆ STAILQ_FOREACH

#define STAILQ_FOREACH (   var,
  head,
  field 
)    for((var) = (head)->stqh_first; (var); (var) = (var)->field.stqe_next)

Definition at line 199 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 */ \
}
static const char type[]
Definition: chan_ooh323.c:109
static const char name[]
Definition: cdr_mysql.c:74

Definition at line 172 of file queue.h.

◆ STAILQ_HEAD_INITIALIZER

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

Definition at line 178 of file queue.h.

◆ STAILQ_INIT

#define STAILQ_INIT (   head)
Value:
do { \
(head)->stqh_first = NULL; \
(head)->stqh_last = &(head)->stqh_first; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 191 of file queue.h.

◆ STAILQ_INSERT_AFTER

#define STAILQ_INSERT_AFTER (   head,
  tqelm,
  elm,
  field 
)
Value:
do { \
if (((elm)->field.stqe_next = (tqelm)->field.stqe_next) == NULL)\
(head)->stqh_last = &(elm)->field.stqe_next; \
(tqelm)->field.stqe_next = (elm); \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 214 of file queue.h.

◆ STAILQ_INSERT_HEAD

#define STAILQ_INSERT_HEAD (   head,
  elm,
  field 
)
Value:
do { \
if (((elm)->field.stqe_next = (head)->stqh_first) == NULL) \
(head)->stqh_last = &(elm)->field.stqe_next; \
(head)->stqh_first = (elm); \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 202 of file queue.h.

◆ STAILQ_INSERT_TAIL

#define STAILQ_INSERT_TAIL (   head,
  elm,
  field 
)
Value:
do { \
(elm)->field.stqe_next = NULL; \
*(head)->stqh_last = (elm); \
(head)->stqh_last = &(elm)->field.stqe_next; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 208 of file queue.h.

◆ STAILQ_LAST

#define STAILQ_LAST (   head)    (*(head)->stqh_last)

Definition at line 197 of file queue.h.

◆ STAILQ_NEXT

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

Definition at line 220 of file queue.h.

◆ STAILQ_REMOVE

#define STAILQ_REMOVE (   head,
  elm,
  type,
  field 
)

Definition at line 233 of file queue.h.

◆ STAILQ_REMOVE_HEAD

#define STAILQ_REMOVE_HEAD (   head,
  field 
)
Value:
do { \
if (((head)->stqh_first = \
(head)->stqh_first->field.stqe_next) == NULL) \
(head)->stqh_last = &(head)->stqh_first; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 222 of file queue.h.

◆ STAILQ_REMOVE_HEAD_UNTIL

#define STAILQ_REMOVE_HEAD_UNTIL (   head,
  elm,
  field 
)
Value:
do { \
if (((head)->stqh_first = (elm)->field.stqe_next) == NULL) \
(head)->stqh_last = &(head)->stqh_first; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 228 of file queue.h.

◆ TAILQ_EMPTY

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

Definition at line 331 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 */ \
}
static const char type[]
Definition: chan_ooh323.c:109

Definition at line 322 of file queue.h.

◆ TAILQ_FIRST

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

Definition at line 341 of file queue.h.

◆ TAILQ_FOREACH

#define TAILQ_FOREACH (   var,
  head,
  field 
)    for (var = TAILQ_FIRST(head); var; var = TAILQ_NEXT(var, field))

Definition at line 333 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:343
#define var
Definition: ast_expr2f.c:614
#define TAILQ_PREV(elm, headname, field)
Definition: queue.h:348

Definition at line 336 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 */ \
}
static const char type[]
Definition: chan_ooh323.c:109
static const char name[]
Definition: cdr_mysql.c:74

Definition at line 313 of file queue.h.

◆ TAILQ_HEAD_INITIALIZER

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

Definition at line 319 of file queue.h.

◆ TAILQ_INIT

#define TAILQ_INIT (   head)
Value:
do { \
(head)->tqh_first = NULL; \
(head)->tqh_last = &(head)->tqh_first; \
} while (0)
#define NULL
Definition: resample.c:96

Definition at line 351 of file queue.h.

◆ TAILQ_INSERT_AFTER

#define TAILQ_INSERT_AFTER (   head,
  listelm,
  elm,
  field 
)

Definition at line 373 of file queue.h.

◆ TAILQ_INSERT_BEFORE

#define TAILQ_INSERT_BEFORE (   listelm,
  elm,
  field 
)

Definition at line 383 of file queue.h.

◆ TAILQ_INSERT_HEAD

#define TAILQ_INSERT_HEAD (   head,
  elm,
  field 
)

Definition at line 356 of file queue.h.

◆ TAILQ_INSERT_TAIL

#define TAILQ_INSERT_TAIL (   head,
  elm,
  field 
)

Definition at line 366 of file queue.h.

◆ TAILQ_LAST

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

Definition at line 343 of file queue.h.

◆ TAILQ_NEXT

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

Definition at line 346 of file queue.h.

◆ TAILQ_PREV

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

Definition at line 348 of file queue.h.

◆ TAILQ_REMOVE

#define TAILQ_REMOVE (   head,
  elm,
  field 
)

Definition at line 390 of file queue.h.