* Initialize an empty tree. This has 3 nodes, which are passed * via base_nodes (in the order ) and are * marked RNF_ROOT so they cannot be freed. * The leaves have all-zero and all-one keys, with significant * bits starting at 'off'. */
| 1088 | * bits starting at 'off'. |
| 1089 | */ |
| 1090 | void |
| 1091 | rn_inithead_internal(struct radix_head *rh, struct radix_node *base_nodes, int off) |
| 1092 | { |
| 1093 | struct radix_node *t, *tt, *ttt; |
| 1094 | |
| 1095 | t = rn_newpair(rn_zeros, off, base_nodes); |
| 1096 | ttt = base_nodes + 2; |
| 1097 | t->rn_right = ttt; |
| 1098 | t->rn_parent = t; |
| 1099 | tt = t->rn_left; /* ... which in turn is base_nodes */ |
| 1100 | tt->rn_flags = t->rn_flags = RNF_ROOT | RNF_ACTIVE; |
| 1101 | tt->rn_bit = -1 - off; |
| 1102 | *ttt = *tt; |
| 1103 | ttt->rn_key = rn_ones; |
| 1104 | |
| 1105 | rh->rnh_treetop = t; |
| 1106 | } |
| 1107 | |
| 1108 | static void |
| 1109 | rn_detachhead_internal(struct radix_head *head) |
no test coverage detected