Changeset 1db44ea in mainline for kernel/generic/src/adt/btree.c


Ignore:
Timestamp:
2011-09-25T18:46:45Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
36cb22f
Parents:
dcc44ca1 (diff), f9d8c3a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

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

    rdcc44ca1 r1db44ea  
    3838 *
    3939 * The B+tree has the following properties:
    40  * @li it is a ballanced 3-4-5 tree (i.e. BTREE_M = 5)
     40 * @li it is a balanced 3-4-5 tree (i.e. BTREE_M = 5)
    4141 * @li values (i.e. pointers to values) are stored only in leaves
    4242 * @li leaves are linked in a list
    4343 *
    44  * Be carefull when using these trees. They need to allocate
     44 * Be careful when using these trees. They need to allocate
    4545 * and deallocate memory for their index nodes and as such
    4646 * can sleep.
     
    146146 * also makes use of this feature.
    147147 *
    148  * @param node     B-tree node into wich the new key is to be inserted.
     148 * @param node     B-tree node into which the new key is to be inserted.
    149149 * @param key      The key to be inserted.
    150150 * @param value    Pointer to value to be inserted.
     
    270270 * This feature is used during insert by right rotation.
    271271 *
    272  * @param node     B-tree node into wich the new key is to be inserted.
     272 * @param node     B-tree node into which the new key is to be inserted.
    273273 * @param key      The key to be inserted.
    274274 * @param value    Pointer to value to be inserted.
     
    463463        if (rnode->keys < BTREE_MAX_KEYS) {
    464464                /*
    465                  * The rotaion can be done. The right sibling has free space.
     465                 * The rotation can be done. The right sibling has free space.
    466466                 */
    467467                node_insert_key_and_rsubtree(node, inskey, insvalue, rsubtree);
     
    484484 * the median will be copied there.
    485485 *
    486  * @param node     B-tree node wich is going to be split.
     486 * @param node     B-tree node which is going to be split.
    487487 * @param key      The key to be inserted.
    488488 * @param value    Pointer to the value to be inserted.
     
    562562        if (node->keys < BTREE_MAX_KEYS) {
    563563                /*
    564                  * Node conatins enough space, the key can be stored immediately.
     564                 * Node contains enough space, the key can be stored immediately.
    565565                 */
    566566                node_insert_key_and_rsubtree(node, key, value, rsubtree);
     
    806806               
    807807                /*
    808                  * The key can be immediatelly removed.
     808                 * The key can be immediately removed.
    809809                 *
    810810                 * Note that the right subtree is removed because when
Note: See TracChangeset for help on using the changeset viewer.