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