Lines Matching refs:elm

69 #define	PTQ_INSERT_HEAD(head, elm, field) do {				\  argument
70 if (((elm)->field.ptqe_next = (head)->ptqh_first) != NULL) \
72 &(elm)->field.ptqe_next; \
74 (head)->ptqh_last = &(elm)->field.ptqe_next; \
75 (head)->ptqh_first = (elm); \
76 (elm)->field.ptqe_prev = &(head)->ptqh_first; \
79 #define PTQ_INSERT_TAIL(head, elm, field) do { \ argument
80 (elm)->field.ptqe_next = NULL; \
83 (elm)->field.ptqe_prev = (head)->ptqh_last; \
84 *(head)->ptqh_last = (elm); \
85 (head)->ptqh_last = &(elm)->field.ptqe_next; \
88 #define PTQ_INSERT_AFTER(head, listelm, elm, field) do { \ argument
89 if (((elm)->field.ptqe_next = (listelm)->field.ptqe_next) != NULL)\
90 (elm)->field.ptqe_next->field.ptqe_prev = \
91 &(elm)->field.ptqe_next; \
93 (head)->ptqh_last = &(elm)->field.ptqe_next; \
94 (listelm)->field.ptqe_next = (elm); \
95 (elm)->field.ptqe_prev = &(listelm)->field.ptqe_next; \
98 #define PTQ_INSERT_BEFORE(listelm, elm, field) do { \ argument
99 (elm)->field.ptqe_prev = (listelm)->field.ptqe_prev; \
100 (elm)->field.ptqe_next = (listelm); \
101 *(listelm)->field.ptqe_prev = (elm); \
102 (listelm)->field.ptqe_prev = &(elm)->field.ptqe_next; \
105 #define PTQ_REMOVE(head, elm, field) do { \ argument
106 if (((elm)->field.ptqe_next) != NULL) \
107 (elm)->field.ptqe_next->field.ptqe_prev = \
108 (elm)->field.ptqe_prev; \
110 (head)->ptqh_last = (elm)->field.ptqe_prev; \
111 *(elm)->field.ptqe_prev = (elm)->field.ptqe_next; \
120 #define PTQ_NEXT(elm, field) ((elm)->field.ptqe_next) argument
124 #define PTQ_PREV(elm, headname, field) \ argument
125 (*(((struct headname *)(void *)((elm)->field.ptqe_prev))->ptqh_last))