Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/adt/btree.c

    r7a0359b re3ee9b9  
    5353#include <panic.h>
    5454#include <print.h>
    55 #include <trace.h>
    5655
    5756static slab_cache_t *btree_node_slab;
     
    8079 *
    8180 */
    82 NO_TRACE static void node_initialize(btree_node_t *node)
     81static void node_initialize(btree_node_t *node)
    8382{
    8483        unsigned int i;
     
    119118 *
    120119 */
    121 NO_TRACE static void btree_destroy_subtree(btree_node_t *root)
     120static void btree_destroy_subtree(btree_node_t *root)
    122121{
    123122        size_t i;
     
    152151 *
    153152 */
    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)
     153static void node_insert_key_and_rsubtree(btree_node_t *node, btree_key_t key,
     154    void *value, btree_node_t *rsubtree)
    156155{
    157156        size_t i;
     
    187186 *
    188187 */
    189 NO_TRACE static size_t find_key_by_subtree(btree_node_t *node,
    190     btree_node_t *subtree, bool right)
     188static size_t find_key_by_subtree(btree_node_t *node, btree_node_t *subtree,
     189    bool right)
    191190{
    192191        size_t i;
     
    210209 *
    211210 */
    212 NO_TRACE static void node_remove_key_and_lsubtree(btree_node_t *node,
    213     btree_key_t key)
     211static void node_remove_key_and_lsubtree(btree_node_t *node, btree_key_t key)
    214212{
    215213        size_t i;
     
    244242 *
    245243 */
    246 NO_TRACE static void node_remove_key_and_rsubtree(btree_node_t *node,
    247     btree_key_t key)
     244static void node_remove_key_and_rsubtree(btree_node_t *node, btree_key_t key)
    248245{
    249246        size_t i, j;
     
    276273 *
    277274 */
    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)
     275static void node_insert_key_and_lsubtree(btree_node_t *node, btree_key_t key,
     276    void *value, btree_node_t *lsubtree)
    280277{
    281278        size_t i;
     
    316313 *
    317314 */
    318 NO_TRACE static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode,
    319     size_t idx)
     315static void rotate_from_left(btree_node_t *lnode, btree_node_t *rnode, size_t idx)
    320316{
    321317        btree_key_t key = lnode->key[lnode->keys - 1];
     
    352348 *
    353349 */
    354 NO_TRACE static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode,
    355     size_t idx)
     350static void rotate_from_right(btree_node_t *lnode, btree_node_t *rnode, size_t idx)
    356351{
    357352        btree_key_t key = rnode->key[0];
     
    390385 *
    391386 */
    392 NO_TRACE static bool try_insert_by_rotation_to_left(btree_node_t *node,
     387static bool try_insert_by_rotation_to_left(btree_node_t *node,
    393388    btree_key_t inskey, void *insvalue, btree_node_t *rsubtree)
    394389{
     
    439434 *
    440435 */
    441 NO_TRACE static bool try_insert_by_rotation_to_right(btree_node_t *node,
     436static bool try_insert_by_rotation_to_right(btree_node_t *node,
    442437    btree_key_t inskey, void *insvalue, btree_node_t *rsubtree)
    443438{
     
    493488 *
    494489 */
    495 NO_TRACE static btree_node_t *node_split(btree_node_t *node, btree_key_t key,
     490static btree_node_t *node_split(btree_node_t *node, btree_key_t key,
    496491    void *value, btree_node_t *rsubtree, btree_key_t *median)
    497492{
     
    557552 *
    558553 */
    559 NO_TRACE static void _btree_insert(btree_t *t, btree_key_t key, void *value,
     554static void _btree_insert(btree_t *t, btree_key_t key, void *value,
    560555    btree_node_t *rsubtree, btree_node_t *node)
    561556{
     
    644639 *
    645640 */
    646 NO_TRACE static bool try_rotation_from_left(btree_node_t *rnode)
     641static bool try_rotation_from_left(btree_node_t *rnode)
    647642{
    648643        size_t idx;
     
    681676 *
    682677 */
    683 NO_TRACE static bool try_rotation_from_right(btree_node_t *lnode)
     678static bool try_rotation_from_right(btree_node_t *lnode)
    684679{
    685680        size_t idx;
     
    719714 *
    720715 */
    721 NO_TRACE static btree_node_t *node_combine(btree_node_t *node)
     716static btree_node_t *node_combine(btree_node_t *node)
    722717{
    723718        size_t idx;
     
    769764 *
    770765 */
    771 NO_TRACE static void _btree_remove(btree_t *t, btree_key_t key,
    772     btree_node_t *node)
     766static void _btree_remove(btree_t *t, btree_key_t key, btree_node_t *node)
    773767{
    774768        if (ROOT_NODE(node)) {
Note: See TracChangeset for help on using the changeset viewer.