Lines Matching refs:list
23 #define INIT_LIST(list) \ argument
24 do { (list).head = NULL; (list).tail = NULL; } while (0)
37 #define HEAD(list) ((list).head) argument
38 #define TAIL(list) ((list).tail) argument
39 #define EMPTY(list) ((list).head == NULL) argument
41 #define PREPEND(list, elt, link) \ argument
44 if ((list).head != NULL) \
45 (list).head->link.prev = (elt); \
47 (list).tail = (elt); \
49 (elt)->link.next = (list).head; \
50 (list).head = (elt); \
53 #define APPEND(list, elt, link) \ argument
56 if ((list).tail != NULL) \
57 (list).tail->link.next = (elt); \
59 (list).head = (elt); \
60 (elt)->link.prev = (list).tail; \
62 (list).tail = (elt); \
65 #define UNLINK_TYPE(list, elt, link, type) \ argument
71 INSIST((list).tail == (elt)); \
72 (list).tail = (elt)->link.prev; \
77 INSIST((list).head == (elt)); \
78 (list).head = (elt)->link.next; \
82 #define UNLINK(list, elt, link) \ argument
83 UNLINK_TYPE(list, elt, link, void)
88 #define INSERT_BEFORE(list, before, elt, link) \ argument
92 PREPEND(list, elt, link); \
101 #define INSERT_AFTER(list, after, elt, link) \ argument
105 APPEND(list, elt, link); \
114 #define ENQUEUE(list, elt, link) APPEND(list, elt, link) argument
115 #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) argument