Changes in kernel/generic/src/adt/btree.c [e3ee9b9:7a0359b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/adt/btree.c
re3ee9b9 r7a0359b 53 53 #include <panic.h> 54 54 #include <print.h> 55 #include <trace.h> 55 56 56 57 static slab_cache_t *btree_node_slab; … … 79 80 * 80 81 */ 81 static void node_initialize(btree_node_t *node)82 NO_TRACE static void node_initialize(btree_node_t *node) 82 83 { 83 84 unsigned int i; … … 118 119 * 119 120 */ 120 static void btree_destroy_subtree(btree_node_t *root)121 NO_TRACE static void btree_destroy_subtree(btree_node_t *root) 121 122 { 122 123 size_t i; … … 151 152 * 152 153 */ 153 static void node_insert_key_and_rsubtree(btree_node_t *node, btree_key_t key,154 void *value, btree_node_t *rsubtree)154 NO_TRACE static void node_insert_key_and_rsubtree(btree_node_t *node, 155 btree_key_t key, void *value, btree_node_t *rsubtree) 155 156 { 156 157 size_t i; … … 186 187 * 187 188 */ 188 static size_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree,189 b ool right)189 NO_TRACE static size_t find_key_by_subtree(btree_node_t *node, 190 btree_node_t *subtree, bool right) 190 191 { 191 192 size_t i; … … 209 210 * 210 211 */ 211 static void node_remove_key_and_lsubtree(btree_node_t *node, btree_key_t key) 212 NO_TRACE static void node_remove_key_and_lsubtree(btree_node_t *node, 213 btree_key_t key) 212 214 { 213 215 size_t i; … … 242 244 * 243 245 */ 244 static void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key) 246 NO_TRACE static void node_remove_key_and_rsubtree(btree_node_t *node, 247 btree_key_t key) 245 248 { 246 249 size_t i, j; … … 273 276 * 274 277 */ 275 static void node_insert_key_and_lsubtree(btree_node_t *node, btree_key_t key,276 void *value, btree_node_t *lsubtree)278 NO_TRACE static void node_insert_key_and_lsubtree(btree_node_t *node, 279 btree_key_t key, void *value, btree_node_t *lsubtree) 277 280 { 278 281 size_t i; … … 313 316 * 314 317 */ 315 static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, size_t idx) 318 NO_TRACE static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, 319 size_t idx) 316 320 { 317 321 btree_key_t key = lnode->key[lnode->keys - 1]; … … 348 352 * 349 353 */ 350 static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, size_t idx) 354 NO_TRACE static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, 355 size_t idx) 351 356 { 352 357 btree_key_t key = rnode->key[0]; … … 385 390 * 386 391 */ 387 static bool try_insert_by_rotation_to_left(btree_node_t *node,392 NO_TRACE static bool try_insert_by_rotation_to_left(btree_node_t *node, 388 393 btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) 389 394 { … … 434 439 * 435 440 */ 436 static bool try_insert_by_rotation_to_right(btree_node_t *node,441 NO_TRACE static bool try_insert_by_rotation_to_right(btree_node_t *node, 437 442 btree_key_t inskey, void *insvalue, btree_node_t *rsubtree) 438 443 { … … 488 493 * 489 494 */ 490 static btree_node_t *node_split(btree_node_t *node, btree_key_t key,495 NO_TRACE static btree_node_t *node_split(btree_node_t *node, btree_key_t key, 491 496 void *value, btree_node_t *rsubtree, btree_key_t *median) 492 497 { … … 552 557 * 553 558 */ 554 static void _btree_insert(btree_t *t, btree_key_t key, void *value,559 NO_TRACE static void _btree_insert(btree_t *t, btree_key_t key, void *value, 555 560 btree_node_t *rsubtree, btree_node_t *node) 556 561 { … … 639 644 * 640 645 */ 641 static bool try_rotation_from_left(btree_node_t *rnode)646 NO_TRACE static bool try_rotation_from_left(btree_node_t *rnode) 642 647 { 643 648 size_t idx; … … 676 681 * 677 682 */ 678 static bool try_rotation_from_right(btree_node_t *lnode)683 NO_TRACE static bool try_rotation_from_right(btree_node_t *lnode) 679 684 { 680 685 size_t idx; … … 714 719 * 715 720 */ 716 static btree_node_t *node_combine(btree_node_t *node)721 NO_TRACE static btree_node_t *node_combine(btree_node_t *node) 717 722 { 718 723 size_t idx; … … 764 769 * 765 770 */ 766 static void _btree_remove(btree_t *t, btree_key_t key, btree_node_t *node) 771 NO_TRACE static void _btree_remove(btree_t *t, btree_key_t key, 772 btree_node_t *node) 767 773 { 768 774 if (ROOT_NODE(node)) {
Note:
See TracChangeset
for help on using the changeset viewer.