Lines Matching refs:list
32 #define INIT_LIST(list) \ argument
33 do { (list).head = NULL; (list).tail = NULL; } while (0)
46 #define HEAD(list) ((list).head) argument
47 #define TAIL(list) ((list).tail) argument
48 #define EMPTY(list) ((list).head == NULL) argument
50 #define PREPEND(list, elt, link) \ argument
53 if ((list).head != NULL) \
54 (list).head->link.prev = (elt); \
56 (list).tail = (elt); \
58 (elt)->link.next = (list).head; \
59 (list).head = (elt); \
62 #define APPEND(list, elt, link) \ argument
65 if ((list).tail != NULL) \
66 (list).tail->link.next = (elt); \
68 (list).head = (elt); \
69 (elt)->link.prev = (list).tail; \
71 (list).tail = (elt); \
74 #define UNLINK_TYPE(list, elt, link, type) \ argument
80 INSIST((list).tail == (elt)); \
81 (list).tail = (elt)->link.prev; \
86 INSIST((list).head == (elt)); \
87 (list).head = (elt)->link.next; \
91 #define UNLINK(list, elt, link) \ argument
92 UNLINK_TYPE(list, elt, link, void)
97 #define INSERT_BEFORE(list, before, elt, link) \ argument
101 PREPEND(list, elt, link); \
110 #define INSERT_AFTER(list, after, elt, link) \ argument
114 APPEND(list, elt, link); \
123 #define ENQUEUE(list, elt, link) APPEND(list, elt, link) argument
124 #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) argument