[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1302864730.2388.237.camel@twins>
Date: Fri, 15 Apr 2011 12:52:10 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Rob Landley <rlandley@...allels.com>
Cc: linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
Pallipadi Venkatesh <venkatesh.pallipadi@...el.com>,
Suresh Siddha <suresh.b.siddha@...el.com>,
Randy Dunlap <rdunlap@...otime.net>
Subject: Re: [PATCH] Attempt to clarify "Augmented Trees" section of
Documentation/rbtree.txt
On Thu, 2011-04-14 at 14:22 -0500, Rob Landley wrote:
> +This function is called when either of a node's children change. It is not
> +called recursively: the callback function is responsible for traversing parent
> +nodes and updating their information as necessary.
static void rb_augment_path(struct rb_node *node, rb_augment_f func, void *data)
{
struct rb_node *parent;
up:
func(node, data);
parent = rb_parent(node);
if (!parent)
return;
if (node == parent->rb_left && parent->rb_right)
func(parent->rb_right, data);
else if (parent->rb_left)
func(parent->rb_left, data);
node = parent;
goto up;
}
Uhm, what?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists