Lines Matching refs:prev
5 #define DLLIST_PREPEND_FULL(list, item, prev, next) STMT_START { \
6 (item)->prev = NULL; \
8 if (*(list) != NULL) (*(list))->prev = (item); \
13 DLLIST_PREPEND_FULL(list, item, prev, next)
15 #define DLLIST_REMOVE_FULL(list, item, prev, next) STMT_START { \
16 if ((item)->prev != NULL) \
17 (item)->prev->next = (item)->next; \
21 (item)->next->prev = (item)->prev; \
24 (item)->prev = NULL; \
28 DLLIST_REMOVE_FULL(list, item, prev, next)
31 #define DLLIST2_PREPEND_FULL(head, tail, item, prev, next) STMT_START { \
32 (item)->prev = NULL; \
34 if (*(head) != NULL) (*(head))->prev = (item); else (*tail) = (item); \
39 DLLIST2_PREPEND_FULL(head, tail, item, prev, next)
41 #define DLLIST2_APPEND_FULL(head, tail, item, prev, next) STMT_START { \
42 (item)->prev = *(tail); \
49 DLLIST2_APPEND_FULL(head, tail, item, prev, next)
51 #define DLLIST2_INSERT_AFTER_FULL(head, tail, after, item, prev, next) \
53 (item)->prev = (after); \
56 (after)->next->prev = (item); \
63 DLLIST2_INSERT_AFTER_FULL(head, tail, after, item, prev, next)
65 #define DLLIST2_REMOVE_FULL(head, tail, item, prev, next) STMT_START { \
66 if ((item)->prev != NULL) \
67 (item)->prev->next = (item)->next; \
71 (item)->next->prev = (item)->prev; \
74 *(tail) = (item)->prev; \
75 (item)->prev = NULL; \
79 DLLIST2_REMOVE_FULL(head, tail, item, prev, next)