Lines Matching refs:node_t

5 typedef struct node_s node_t;  typedef
10 phn(node_t) link;
15 node_cmp(const node_t *a, const node_t *b) { in node_cmp()
31 node_cmp_magic(const node_t *a, const node_t *b) { in node_cmp_magic()
39 typedef ph(node_t) heap_t;
40 ph_gen(static, heap_, heap_t, node_t, link, node_cmp_magic);
43 node_print(const node_t *node, unsigned depth) { in node_print()
45 node_t *leftmost_child, *sibling; in node_print()
52 leftmost_child = phn_lchild_get(node_t, link, node); in node_print()
58 for (sibling = phn_next_get(node_t, link, leftmost_child); sibling != in node_print()
59 NULL; sibling = phn_next_get(node_t, link, sibling)) { in node_print()
66 node_t *auxelm; in heap_print()
75 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_print()
76 auxelm = phn_next_get(node_t, link, auxelm)) { in heap_print()
77 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in heap_print()
88 node_validate(const node_t *node, const node_t *parent) { in node_validate()
90 node_t *leftmost_child, *sibling; in node_validate()
97 leftmost_child = phn_lchild_get(node_t, link, node); in node_validate()
101 assert_ptr_eq((void *)phn_prev_get(node_t, link, leftmost_child), in node_validate()
105 for (sibling = phn_next_get(node_t, link, leftmost_child); sibling != in node_validate()
106 NULL; sibling = phn_next_get(node_t, link, sibling)) { in node_validate()
107 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in node_validate()
118 node_t *auxelm; in heap_validate()
126 for (auxelm = phn_next_get(node_t, link, heap->ph_root); auxelm != NULL; in heap_validate()
127 auxelm = phn_next_get(node_t, link, auxelm)) { in heap_validate()
128 assert_ptr_eq(phn_next_get(node_t, link, phn_prev_get(node_t, in heap_validate()
152 node_remove(heap_t *heap, node_t *node) { in node_remove()
158 static node_t *
160 node_t *node = heap_remove_first(heap); in node_remove_first()
165 static node_t *
167 node_t *node = heap_remove_any(heap); in node_remove_any()
179 node_t nodes[NNODES]; in TEST_BEGIN()
249 node_t *prev = NULL; in TEST_BEGIN()
251 node_t *node = node_remove_first(&heap); in TEST_BEGIN()
263 node_t *prev = NULL; in TEST_BEGIN()
265 node_t *node = heap_first(&heap); in TEST_BEGIN()
288 node_t *node = heap_any(&heap); in TEST_BEGIN()