Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2460 → Rev 2461

/branches/rcu/kernel/generic/src/adt/avl.c
37,7 → 37,7
* This file implements AVL tree type and operations.
*
* Implemented AVL tree has the following properties:
* @li it is binary search tree with non-unique keys
* @li It is binary search tree with non-unique keys.
* @li Difference of heights of left and right subtree of every node is max 1.
*
* Every node has pointer to its parent which allows insertion of multiple identical keys
49,7 → 49,6
 
#include <adt/avl.h>
#include <debug.h>
#include <panic.h>
 
 
#define AVLTREE_LEFT 0
131,9 → 130,9
 
/*
* Iteratively descend to the leaf that can will contain new node.
* Iteratively descend to the leaf that can contain new node.
* Last node with non-zero balance in the way to leaf is stored as top -
* it si place of possible balance failure.
* it si place of possible balance fault.
*/
dpc = &t->root;
gpa = NULL;
697,7 → 696,6
bool avltree_delete_min(avltree_t *t)
{
avltree_node_t *node;
uint64_t key;
/*
* Start search of smallest key in tree in the root node and
711,9 → 709,8
node = node->lft;
/*
* Store key and use avltree_delete function to delete node from tree.
* Use avltree_delete function to delete node from tree.
*/
key = node->key;
avltree_delete(t,node);
 
return true;