| 189 | } |
| 190 | |
| 191 | static int _check_bst_before(struct rt_aspace *aspace, struct rt_varea *varea) |
| 192 | { |
| 193 | rt_varea_t root = VAREA_ENTRY(aspace->tree.tree.root_node); |
| 194 | int height = _is_balanced(root); |
| 195 | |
| 196 | if (root) |
| 197 | RT_ASSERT(height); |
| 198 | |
| 199 | memset(_buf, 0, sizeof(_buf)); // clear first avoiding none tree error |
| 200 | _start = 0; |
| 201 | _boundary = 0; |
| 202 | _count = 0; |
| 203 | |
| 204 | _aspace_traversal(aspace, _check_asc_before, varea); |
| 205 | int saved = _count; |
| 206 | _aspace_traversal_reverse(aspace, _check_asc_before_rev, varea); |
| 207 | _count = saved; |
| 208 | |
| 209 | return 1; |
| 210 | } |
| 211 | |
| 212 | static int _check_bst_after(struct rt_aspace *aspace, struct rt_varea *varea, int isdel) |
| 213 | { |
no test coverage detected