Lines Matching refs:list
25 #define INIT_LIST(list) \ argument
26 do { (list).head = NULL; (list).tail = NULL; } while (/*CONSTCOND*/0)
38 #define HEAD(list) ((list).head) argument
39 #define TAIL(list) ((list).tail) argument
40 #define EMPTY(list) ((list).head == NULL) argument
42 #define PREPEND(list, elt, link) \ argument
45 if ((list).head != NULL) \
46 (list).head->link.prev = (elt); \
48 (list).tail = (elt); \
50 (elt)->link.next = (list).head; \
51 (list).head = (elt); \
54 #define APPEND(list, elt, link) \ argument
57 if ((list).tail != NULL) \
58 (list).tail->link.next = (elt); \
60 (list).head = (elt); \
61 (elt)->link.prev = (list).tail; \
63 (list).tail = (elt); \
66 #define UNLINK_TYPE(list, elt, link, type) \ argument
72 (list).tail = (elt)->link.prev; \
76 (list).head = (elt)->link.next; \
79 #define UNLINK(list, elt, link) \ argument
80 UNLINK_TYPE(list, elt, link, void)
85 #define INSERT_BEFORE(list, before, elt, link) \ argument
89 PREPEND(list, elt, link); \
98 #define INSERT_AFTER(list, after, elt, link) \ argument
102 APPEND(list, elt, link); \
111 #define ENQUEUE(list, elt, link) APPEND(list, elt, link) argument
112 #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) argument