Changeset c47912f in mainline for generic/src/mm/as.c


Ignore:
Timestamp:
2006-04-04T09:04:15Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
448743f
Parents:
2a1fa51
Message:

Rename btree_node_left_sibling() to btree_leaf_node_left_neighbour()
and btree_node_right_sibling() to btree_leaf_node_right_neighbour()
as the left and right neighbours of a node needn't be its siblings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • generic/src/mm/as.c

    r2a1fa51 rc47912f  
    526526       
    527527        /*
    528          * Search the leaf node and the righmost record of its left sibling
     528         * Search the leaf node and the righmost record of its left neighbour
    529529         * to find out whether this is a miss or va belongs to an address
    530530         * space area found there.
     
    542542
    543543        /*
    544          * Second, locate the left sibling and test its last record.
     544         * Second, locate the left neighbour and test its last record.
    545545         * Because of its position in the B+tree, it must have base < va.
    546546         */
    547         if ((lnode = btree_node_left_sibling(&as->as_area_btree, leaf))) {
     547        if ((lnode = btree_leaf_node_left_neighbour(&as->as_area_btree, leaf))) {
    548548                a = (as_area_t *) lnode->value[lnode->keys - 1];
    549549                spinlock_lock(&a->lock);
     
    584584         * the number of address space areas belonging to as.
    585585         * The check for conflicts is then attempted on the rightmost
    586          * record in the left sibling, the leftmost record in the right
    587          * sibling and all records in the leaf node itself.
     586         * record in the left neighbour, the leftmost record in the right
     587         * neighbour and all records in the leaf node itself.
    588588         */
    589589       
     
    594594       
    595595        /* First, check the two border cases. */
    596         if ((node = btree_node_left_sibling(&as->as_area_btree, leaf))) {
     596        if ((node = btree_leaf_node_left_neighbour(&as->as_area_btree, leaf))) {
    597597                a = (as_area_t *) node->value[node->keys - 1];
    598598                spinlock_lock(&a->lock);
     
    603603                spinlock_unlock(&a->lock);
    604604        }
    605         if ((node = btree_node_right_sibling(&as->as_area_btree, leaf))) {
     605        if ((node = btree_leaf_node_right_neighbour(&as->as_area_btree, leaf))) {
    606606                a = (as_area_t *) node->value[0];
    607607                spinlock_lock(&a->lock);
Note: See TracChangeset for help on using the changeset viewer.