Changeset View
Changeset View
Standalone View
Standalone View
stable/11/sys/sys/queue.h
Show First 20 Lines • Show All 87 Lines • ▼ Show 20 Lines | |||||
* _ENTRY + + + + | * _ENTRY + + + + | ||||
* _CLASS_ENTRY + + + + | * _CLASS_ENTRY + + + + | ||||
* _INIT + + + + | * _INIT + + + + | ||||
* _EMPTY + + + + | * _EMPTY + + + + | ||||
* _FIRST + + + + | * _FIRST + + + + | ||||
* _NEXT + + + + | * _NEXT + + + + | ||||
* _PREV - + - + | * _PREV - + - + | ||||
* _LAST - - + + | * _LAST - - + + | ||||
* _LAST_FAST - - - + | |||||
* _FOREACH + + + + | * _FOREACH + + + + | ||||
* _FOREACH_FROM + + + + | * _FOREACH_FROM + + + + | ||||
* _FOREACH_SAFE + + + + | * _FOREACH_SAFE + + + + | ||||
* _FOREACH_FROM_SAFE + + + + | * _FOREACH_FROM_SAFE + + + + | ||||
* _FOREACH_REVERSE - - - + | * _FOREACH_REVERSE - - - + | ||||
* _FOREACH_REVERSE_FROM - - - + | * _FOREACH_REVERSE_FROM - - - + | ||||
* _FOREACH_REVERSE_SAFE - - - + | * _FOREACH_REVERSE_SAFE - - - + | ||||
* _FOREACH_REVERSE_FROM_SAFE - - - + | * _FOREACH_REVERSE_FROM_SAFE - - - + | ||||
▲ Show 20 Lines • Show All 634 Lines • ▼ Show 20 Lines | #define TAILQ_INSERT_TAIL(head, elm, field) do { \ | ||||
*(head)->tqh_last = (elm); \ | *(head)->tqh_last = (elm); \ | ||||
(head)->tqh_last = &TAILQ_NEXT((elm), field); \ | (head)->tqh_last = &TAILQ_NEXT((elm), field); \ | ||||
QMD_TRACE_HEAD(head); \ | QMD_TRACE_HEAD(head); \ | ||||
QMD_TRACE_ELEM(&(elm)->field); \ | QMD_TRACE_ELEM(&(elm)->field); \ | ||||
} while (0) | } while (0) | ||||
#define TAILQ_LAST(head, headname) \ | #define TAILQ_LAST(head, headname) \ | ||||
(*(((struct headname *)((head)->tqh_last))->tqh_last)) | (*(((struct headname *)((head)->tqh_last))->tqh_last)) | ||||
/* | |||||
* The FAST function is fast in that it causes no data access other | |||||
* then the access to the head. The standard LAST function above | |||||
* will cause a data access of both the element you want and | |||||
* the previous element. FAST is very useful for instances when | |||||
* you may want to prefetch the last data element. | |||||
*/ | |||||
#define TAILQ_LAST_FAST(head, type, field) \ | |||||
(TAILQ_EMPTY(head) ? NULL : __containerof((head)->tqh_last, QUEUE_TYPEOF(type), field.tqe_next)) | |||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) | #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next) | ||||
#define TAILQ_PREV(elm, headname, field) \ | #define TAILQ_PREV(elm, headname, field) \ | ||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) | (*(((struct headname *)((elm)->field.tqe_prev))->tqh_last)) | ||||
#define TAILQ_REMOVE(head, elm, field) do { \ | #define TAILQ_REMOVE(head, elm, field) do { \ | ||||
QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ | QMD_SAVELINK(oldnext, (elm)->field.tqe_next); \ | ||||
Show All 34 Lines |