Thread (38 messages) 38 messages, 4 authors, 2012-08-07

Re: [PATCH v2 3/9] rbtree: add __rb_change_child() helper function

From: Peter Zijlstra <peterz@infradead.org>
Date: 2012-08-06 14:22:27
Also in: lkml

On Thu, 2012-08-02 at 15:34 -0700, Michel Lespinasse wrote:
+static inline void
I would make that __always_inline, just to make sure GCC doesn't go
creative on us.
+__rb_change_child(struct rb_node *old, struct rb_node *new,
+                 struct rb_node *parent, struct rb_root *root)
+{
+       if (parent) {
+               if (parent->rb_left == old)
+                       parent->rb_left = new;
+               else
+                       parent->rb_right = new;
+       } else
+               root->rb_node = new;
+} 
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help