Lines Matching refs:nodep
126 node_t *nodep = *c_node; in t_split() local
130 if (pos == (nodep->pos - nodep->bits)) { in t_split()
132 ASSERT(nodep->one == NULL); in t_split()
133 ASSERT(nodep->zero == NULL); in t_split()
134 nodep->one = create_node(KM_SLEEP); in t_split()
135 nodep->zero = create_node(KM_SLEEP); in t_split()
137 old_bits = nodep->bits; /* save old bits entry */ in t_split()
139 nodep->bits = nodep->pos - pos; in t_split()
141 bit = EXTRACTBIT(nodep->val, pos, key_len); in t_split()
143 if ((nodep->one == NULL) && (nodep->zero == NULL)) { in t_split()
144 nodep->one = create_node(KM_SLEEP); in t_split()
145 nodep->zero = create_node(KM_SLEEP); in t_split()
148 tnodep->one = nodep->one; in t_split()
149 tnodep->zero = nodep->zero; in t_split()
150 nodep->zero = tnodep; in t_split()
151 nodep->one = create_node(KM_SLEEP); in t_split()
154 nodep->zero->pos = pos - 1; /* link is one bit */ in t_split()
156 nodep->zero->bits = (old_bits - nodep->bits) - 1; in t_split()
158 for (i = 0; i < nodep->zero->bits; ++i) { in t_split()
159 SETBIT(nodep->zero->val, in t_split()
160 (nodep->zero->pos - i), in t_split()
161 EXTRACTBIT(nodep->val, in t_split()
162 (nodep->zero->pos - i), key_len), in t_split()
164 SETBIT(nodep->zero->mask, in t_split()
165 (nodep->zero->pos - i), 1, key_len); in t_split()
167 nodep->zero->elements = nodep->elements; in t_split()
168 nodep->elements = NULL; in t_split()
170 if ((nodep->one == NULL) && (nodep->zero == NULL)) { in t_split()
171 nodep->one = create_node(KM_SLEEP); in t_split()
172 nodep->zero = create_node(KM_SLEEP); in t_split()
175 tnodep->one = nodep->one; in t_split()
176 tnodep->zero = nodep->zero; in t_split()
177 nodep->one = tnodep; in t_split()
178 nodep->zero = create_node(KM_SLEEP); in t_split()
181 nodep->one->pos = pos - 1; /* link is one bit */ in t_split()
183 nodep->one->bits = (old_bits - nodep->bits) - 1; in t_split()
185 for (i = 0; i < nodep->one->bits; ++i) { in t_split()
186 SETBIT(nodep->one->val, (nodep->one->pos - i), in t_split()
187 EXTRACTBIT(nodep->val, in t_split()
188 (nodep->one->pos - i), key_len), in t_split()
190 SETBIT(nodep->one->mask, in t_split()
191 (nodep->one->pos - i), 1, key_len); in t_split()
193 nodep->one->elements = nodep->elements; in t_split()
194 nodep->elements = NULL; in t_split()
199 UNSETBIT(nodep->val, i, key_len); in t_split()
200 UNSETBIT(nodep->mask, i, key_len); in t_split()