X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_rbtree.c;h=520e227c586c6e5ae9faa4ebd6642a52ddb75d76;hb=182ea639d7389d7e7e660055a4c460bf8a712ecf;hp=1e55ba1c2edfac510c41c87e47e7849f99a5f3b3;hpb=a4b3e0ab8dc52d98a7d9b65541d7c3c4e825b17c;p=palacios.releases.git diff --git a/palacios/src/palacios/vmm_rbtree.c b/palacios/src/palacios/vmm_rbtree.c index 1e55ba1..520e227 100644 --- a/palacios/src/palacios/vmm_rbtree.c +++ b/palacios/src/palacios/vmm_rbtree.c @@ -20,8 +20,8 @@ linux/lib/rbtree.c */ -#include -#include +#include + static void __rb_rotate_left(struct rb_node *node, struct rb_root *root) { @@ -69,7 +69,7 @@ static void __rb_rotate_right(struct rb_node *node, struct rb_root *root) rb_set_parent(node, left); } -void rb_insert_color(struct rb_node *node, struct rb_root *root) +void v3_rb_insert_color(struct rb_node *node, struct rb_root *root) { struct rb_node *parent, *gparent; @@ -133,7 +133,7 @@ void rb_insert_color(struct rb_node *node, struct rb_root *root) rb_set_black(root->rb_node); } -EXPORT_SYMBOL(rb_insert_color); + static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, struct rb_root *root) @@ -221,7 +221,7 @@ static void __rb_erase_color(struct rb_node *node, struct rb_node *parent, rb_set_black(node); } -void rb_erase(struct rb_node *node, struct rb_root *root) +void v3_rb_erase(struct rb_node *node, struct rb_root *root) { struct rb_node *child, *parent; int color; @@ -287,12 +287,12 @@ void rb_erase(struct rb_node *node, struct rb_root *root) if (color == RB_BLACK) __rb_erase_color(child, parent, root); } -EXPORT_SYMBOL(rb_erase); + /* * This function returns the first node (in sort order) of the tree. */ -struct rb_node *rb_first(struct rb_root *root) +struct rb_node *v3_rb_first(struct rb_root *root) { struct rb_node *n; @@ -303,9 +303,9 @@ struct rb_node *rb_first(struct rb_root *root) n = n->rb_left; return n; } -EXPORT_SYMBOL(rb_first); -struct rb_node *rb_last(struct rb_root *root) + +struct rb_node *v3_rb_last(struct rb_root *root) { struct rb_node *n; @@ -316,9 +316,9 @@ struct rb_node *rb_last(struct rb_root *root) n = n->rb_right; return n; } -EXPORT_SYMBOL(rb_last); -struct rb_node *rb_next(struct rb_node *node) + +struct rb_node *v3_rb_next(struct rb_node *node) { struct rb_node *parent; @@ -342,9 +342,9 @@ struct rb_node *rb_next(struct rb_node *node) return parent; } -EXPORT_SYMBOL(rb_next); -struct rb_node *rb_prev(struct rb_node *node) + +struct rb_node *v3_rb_prev(struct rb_node *node) { struct rb_node *parent; @@ -364,9 +364,9 @@ struct rb_node *rb_prev(struct rb_node *node) return parent; } -EXPORT_SYMBOL(rb_prev); -void rb_replace_node(struct rb_node *victim, struct rb_node *new, + +void v3_rb_replace_node(struct rb_node *victim, struct rb_node *new, struct rb_root *root) { struct rb_node *parent = rb_parent(victim); @@ -388,4 +388,4 @@ void rb_replace_node(struct rb_node *victim, struct rb_node *new, /* Copy the pointers/colour from the victim to the replacement */ *new = *victim; } -EXPORT_SYMBOL(rb_replace_node); +