Subversion Repositories HelenOS-historic

Rev

Rev 1704 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1704 Rev 1708
Line 212... Line 212...
212
       
212
       
213
}
213
}
214
 
214
 
215
/** Remove B-tree node.
215
/** Remove B-tree node.
216
 *
216
 *
217
 * @param B-tree.
217
 * @param t B-tree.
218
 * @param key Key to be removed from the B-tree along with its associated value.
218
 * @param key Key to be removed from the B-tree along with its associated value.
219
 * @param leaf_node If not NULL, pointer to the leaf node where the key is found.
219
 * @param leaf_node If not NULL, pointer to the leaf node where the key is found.
220
 */
220
 */
221
void btree_remove(btree_t *t, btree_key_t key, btree_node_t *leaf_node)
221
void btree_remove(btree_t *t, btree_key_t key, btree_node_t *leaf_node)
222
{
222
{
Line 232... Line 232...
232
    _btree_remove(t, key, lnode);
232
    _btree_remove(t, key, lnode);
233
}
233
}
234
 
234
 
235
/** Recursively remove B-tree node.
235
/** Recursively remove B-tree node.
236
 *
236
 *
237
 * @param B-tree.
237
 * @param t B-tree.
238
 * @param key Key to be removed from the B-tree along with its associated value.
238
 * @param key Key to be removed from the B-tree along with its associated value.
239
 * @param node Node where the key being removed resides.
239
 * @param node Node where the key being removed resides.
240
 */
240
 */
241
void _btree_remove(btree_t *t, btree_key_t key, btree_node_t *node)
241
void _btree_remove(btree_t *t, btree_key_t key, btree_node_t *node)
242
{
242
{
Line 900... Line 900...
900
    return false;
900
    return false;
901
}
901
}
902
 
902
 
903
/** Rotate in a key from the right sibling or from the index node, if this operation can be done.
903
/** Rotate in a key from the right sibling or from the index node, if this operation can be done.
904
 *
904
 *
905
 * @param rnode Node into which to add key from its right sibling or from the index node.
905
 * @param lnode Node into which to add key from its right sibling or from the index node.
906
 *
906
 *
907
 * @return True if the rotation was performed, false otherwise.
907
 * @return True if the rotation was performed, false otherwise.
908
 */
908
 */
909
bool try_rotation_from_right(btree_node_t *lnode)
909
bool try_rotation_from_right(btree_node_t *lnode)
910
{
910
{