Lines Matching refs:prev
55 struct exec_node *prev; member
60 exec_node() : next(NULL), prev(NULL) in exec_node()
121 n->prev = NULL; in exec_node_init()
139 return n->prev; in exec_node_get_prev_const()
145 return n->prev; in exec_node_get_prev()
151 n->next->prev = n->prev; in exec_node_remove()
152 n->prev->next = n->next; in exec_node_remove()
154 n->prev = NULL; in exec_node_remove()
161 n->prev = n; in exec_node_self_link()
168 after->prev = n; in exec_node_insert_after()
170 n->next->prev = after; in exec_node_insert_after()
178 before->prev = n->prev; in exec_node_insert_node_before()
180 n->prev->next = before; in exec_node_insert_node_before()
181 n->prev = before; in exec_node_insert_node_before()
187 replacement->prev = n->prev; in exec_node_replace_with()
190 n->prev->next = replacement; in exec_node_replace_with()
191 n->next->prev = replacement; in exec_node_replace_with()
203 return n->prev == NULL; in exec_node_is_head_sentinel()
354 list->head_sentinel.prev = NULL; in exec_list_make_empty()
356 list->tail_sentinel.prev = &list->head_sentinel; in exec_list_make_empty()
409 return !exec_list_is_empty(list) ? list->tail_sentinel.prev : NULL; in exec_list_get_tail_const()
415 return !exec_list_is_empty(list) ? list->tail_sentinel.prev : NULL; in exec_list_get_tail()
421 return list->tail_sentinel.prev; in exec_list_get_tail_raw_const()
427 return list->tail_sentinel.prev; in exec_list_get_tail_raw()
447 n->prev = &list->head_sentinel; in exec_list_push_head()
449 n->next->prev = n; in exec_list_push_head()
457 n->prev = list->tail_sentinel.prev; in exec_list_push_tail()
459 n->prev->next = n; in exec_list_push_tail()
460 list->tail_sentinel.prev = n; in exec_list_push_tail()
466 assert(n->prev->next == n); in exec_list_push_degenerate_list_at_head()
468 n->prev->next = list->head_sentinel.next; in exec_list_push_degenerate_list_at_head()
469 list->head_sentinel.next->prev = n->prev; in exec_list_push_degenerate_list_at_head()
470 n->prev = &list->head_sentinel; in exec_list_push_degenerate_list_at_head()
491 target->head_sentinel.prev = NULL; in exec_list_move_nodes_to()
493 target->tail_sentinel.prev = list->tail_sentinel.prev; in exec_list_move_nodes_to()
495 target->head_sentinel.next->prev = &target->head_sentinel; in exec_list_move_nodes_to()
496 target->tail_sentinel.prev->next = &target->tail_sentinel; in exec_list_move_nodes_to()
510 list->tail_sentinel.prev->next = source->head_sentinel.next; in exec_list_append()
511 source->head_sentinel.next->prev = list->tail_sentinel.prev; in exec_list_append()
515 list->tail_sentinel.prev = source->tail_sentinel.prev; in exec_list_append()
516 list->tail_sentinel.prev->next = &list->tail_sentinel; in exec_list_append()
529 after->tail_sentinel.prev->next = n->next; in exec_node_insert_list_after()
530 after->head_sentinel.next->prev = n; in exec_node_insert_list_after()
532 n->next->prev = after->tail_sentinel.prev; in exec_node_insert_list_after()
551 before->tail_sentinel.prev->next = n; in exec_node_insert_list_before()
552 before->head_sentinel.next->prev = n->prev; in exec_node_insert_list_before()
554 n->prev->next = before->head_sentinel.next; in exec_node_insert_list_before()
555 n->prev = before->tail_sentinel.prev; in exec_node_insert_list_before()
565 assert(list->head_sentinel.next->prev == &list->head_sentinel); in exec_list_validate()
566 assert(list->head_sentinel.prev == NULL); in exec_list_validate()
568 assert(list->tail_sentinel.prev->next == &list->tail_sentinel); in exec_list_validate()
575 assert(node->next->prev == node); in exec_list_validate()
576 assert(node->prev->next == node); in exec_list_validate()
694 for (__type *__inst = exec_node_typed_backward((__list)->tail_sentinel.prev, __type *); \
696 (__inst) = exec_node_typed_backward((__inst)->prev, __type *))
709 …for (__type *__node = exec_node_typed_backward((__list)->tail_sentinel.prev, __type *), …
710 …*__prev = (__node) ? exec_node_typed_backward((__list)->tail_sentinel.prev->prev, __type *) : NULL…
712 … (__node) = __prev, __prev = __prev ? exec_node_typed_backward(__prev->prev, __type *) : NULL)
755 exec_node_data_backward(__type, (__list)->tail_sentinel.prev, __field); \
757 (__node) = exec_node_data_backward(__type, (__node)->__field.prev, __field))
770 exec_node_data_backward(__type, (__list)->tail_sentinel.prev, __field), \
772 exec_node_data_backward(__type, (__node)->__field.prev, __field) : NULL; \
774 (__node) = __prev, __prev = (__prev && (__prev)->__field.prev) ? \
775 exec_node_data_backward(__type, (__prev)->__field.prev, __field) : NULL)