This is the management of tail queues.
More...
|
| #define | GF_TAILQ_HEAD(name, type) |
| | Head type definition.
|
| #define | GF_TAILQ_ENTRY(type) |
| | Entry in structure.
|
| #define | GF_TAILQ_FIRST(head) |
| | First element of a TAILQ.
|
| #define | GF_TAILQ_NEXT(elm, field) |
| | Next element of a TAILQ.
|
| #define | GF_TAILQ_END(head) |
| | End of a TAILQ.
|
| #define | GF_TAILQ_LAST(head, headname) |
| | Last element of a TAILQ.
|
| #define | GF_TAILQ_PREV(elm, headname, field) |
| | Previous element of a TAILQ.
|
| #define | GF_TAILQ_INIT(head) |
| | Head initialization (Mandatory)
|
| #define | GF_TAILQ_INIT_ENTRY(elm, field) |
| | Entry initialization (optionnal if inserted)
|
| #define | GF_TAILQ_INSERT_HEAD(head, elm, field) |
| | Insert an element at the head.
|
| #define | GF_TAILQ_INSERT_TAIL(head, elm, field) |
| | Insert an element at the tail.
|
| #define | GF_TAILQ_INSERT_AFTER(head, listelm, elm, field) |
| | Insert an element after another element.
|
| #define | GF_TAILQ_INSERT_BEFORE(listelm, elm, field) |
| | Insert an element before another element.
|
| #define | GF_TAILQ_REMOVE(head, elm, field) |
| | Remove an element.
|
This is the management of tail queues.
◆ GF_TAILQ_END
| #define GF_TAILQ_END |
( |
| head | ) |
|
Value:
End of a TAILQ.
Definition at line 469 of file tgf.h.
◆ GF_TAILQ_ENTRY
| #define GF_TAILQ_ENTRY |
( |
| type | ) |
|
Value:struct { \
type *tqe_next; \
type **tqe_prev; \
}
Entry in structure.
Definition at line 455 of file tgf.h.
◆ GF_TAILQ_FIRST
| #define GF_TAILQ_FIRST |
( |
| head | ) |
|
Value:
First element of a TAILQ.
Definition at line 463 of file tgf.h.
◆ GF_TAILQ_HEAD
| #define GF_TAILQ_HEAD |
( |
| name, |
|
|
| type ) |
Value:typedef struct name { \
type *tqh_first; \
type **tqh_last; \
} t ## name
Head type definition.
Definition at line 447 of file tgf.h.
◆ GF_TAILQ_INIT
| #define GF_TAILQ_INIT |
( |
| head | ) |
|
Value: do { \
(head)->tqh_first = NULL; \
(head)->tqh_last = &(head)->tqh_first; \
} while (0)
Head initialization (Mandatory)
Definition at line 484 of file tgf.h.
◆ GF_TAILQ_INIT_ENTRY
| #define GF_TAILQ_INIT_ENTRY |
( |
| elm, |
|
|
| field ) |
Value: do { \
(elm)->field.tqe_next = 0; \
(elm)->field.tqe_prev = 0; \
} while (0)
Entry initialization (optionnal if inserted)
Definition at line 491 of file tgf.h.
◆ GF_TAILQ_INSERT_AFTER
| #define GF_TAILQ_INSERT_AFTER |
( |
| head, |
|
|
| listelm, |
|
|
| elm, |
|
|
| field ) |
Value: do { \
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
(elm)->field.tqe_next->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(listelm)->field.tqe_next = (elm); \
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
} while (0)
Insert an element after another element.
Definition at line 519 of file tgf.h.
◆ GF_TAILQ_INSERT_BEFORE
| #define GF_TAILQ_INSERT_BEFORE |
( |
| listelm, |
|
|
| elm, |
|
|
| field ) |
Value: do { \
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
(elm)->field.tqe_next = (listelm); \
*(listelm)->field.tqe_prev = (elm); \
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
} while (0)
Insert an element before another element.
Definition at line 531 of file tgf.h.
◆ GF_TAILQ_INSERT_HEAD
| #define GF_TAILQ_INSERT_HEAD |
( |
| head, |
|
|
| elm, |
|
|
| field ) |
Value: do { \
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
(head)->tqh_first->field.tqe_prev = \
&(elm)->field.tqe_next; \
else \
(head)->tqh_last = &(elm)->field.tqe_next; \
(head)->tqh_first = (elm); \
(elm)->field.tqe_prev = &(head)->tqh_first; \
} while (0)
Insert an element at the head.
Definition at line 498 of file tgf.h.
◆ GF_TAILQ_INSERT_TAIL
| #define GF_TAILQ_INSERT_TAIL |
( |
| head, |
|
|
| elm, |
|
|
| field ) |
Value: do { \
(elm)->field.tqe_next = NULL; \
(elm)->field.tqe_prev = (head)->tqh_last; \
*(head)->tqh_last = (elm); \
(head)->tqh_last = &(elm)->field.tqe_next; \
} while (0)
Insert an element at the tail.
Definition at line 510 of file tgf.h.
◆ GF_TAILQ_LAST
| #define GF_TAILQ_LAST |
( |
| head, |
|
|
| headname ) |
Value: (*(((struct headname *)((head)->tqh_last))->tqh_last))
Last element of a TAILQ.
Definition at line 472 of file tgf.h.
◆ GF_TAILQ_NEXT
| #define GF_TAILQ_NEXT |
( |
| elm, |
|
|
| field ) |
Value:
Next element of a TAILQ.
Definition at line 466 of file tgf.h.
◆ GF_TAILQ_PREV
| #define GF_TAILQ_PREV |
( |
| elm, |
|
|
| headname, |
|
|
| field ) |
Value: (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
Previous element of a TAILQ.
Definition at line 476 of file tgf.h.
◆ GF_TAILQ_REMOVE
| #define GF_TAILQ_REMOVE |
( |
| head, |
|
|
| elm, |
|
|
| field ) |
Value: do { \
if (((elm)->field.tqe_next) != NULL) \
(elm)->field.tqe_next->field.tqe_prev = \
(elm)->field.tqe_prev; \
else \
(head)->tqh_last = (elm)->field.tqe_prev; \
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
} while (0)
Remove an element.
Definition at line 540 of file tgf.h.