Remove incorrectly duplicated set_left/set_right
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 00:38:33 +0000 (20:38 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 2 Jun 2011 00:38:33 +0000 (20:38 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu-rbtree.c

index e9e24850fe09c0e73a53b850e3fa5dc880d59bbf..1ba3240ac15bd89e27a6c6445aef2f410b7ded1d 100644 (file)
@@ -662,6 +662,7 @@ int rcu_rbtree_insert(struct rcu_rbtree *rbtree,
        z->_right = make_nil(rbtree);
        z->color = COLOR_RED;
        z->decay_next = NULL;
+       z->max_end = z->end;
 
        if (rcu_rbtree_is_nil(rbtree, y))
                set_parent(z, y, IS_RIGHT); /* pos arbitrary for root node */
@@ -678,7 +679,6 @@ int rcu_rbtree_insert(struct rcu_rbtree *rbtree,
                cmm_smp_wmb();
                _CMM_STORE_SHARED(rbtree->root, z);
        } else if (rbtree->comp(z->begin, y->begin) < 0) {
-               set_left(rbtree, y, z);
                /*
                 * Order stores to z (children/parents) before stores
                 * that will make it visible to the rest of the tree.
@@ -691,7 +691,6 @@ int rcu_rbtree_insert(struct rcu_rbtree *rbtree,
                else
                        _CMM_STORE_SHARED(y->_right, z);
        } else {
-               set_right(rbtree, y, z);
                /*
                 * Order stores to z (children/parents) before stores
                 * that will make it visible to the rest of the tree.
@@ -738,12 +737,6 @@ void rcu_rbtree_transplant(struct rcu_rbtree *rbtree,
                _CMM_STORE_SHARED(rbtree->root, v);
        } else {
                set_parent(v, get_parent(u), get_pos(u));
-
-               if (get_pos(u) == IS_LEFT)
-                       set_left(rbtree, get_parent(u), v);
-               else
-                       set_right(rbtree, get_parent(u), v);
-
                cmm_smp_wmb();  /* write into node before publish */
 
                if (rcu_rbtree_is_nil(rbtree, get_parent(u)))
This page took 0.02667 seconds and 4 git commands to generate.