All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Rob Landley <rlandley@parallels.com>
Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	Pallipadi Venkatesh <venkatesh.pallipadi@intel.com>,
	Suresh Siddha <suresh.b.siddha@intel.com>,
	Randy Dunlap <rdunlap@xenotime.net>
Subject: Re: [PATCH] Attempt to clarify "Augmented Trees" section of Documentation/rbtree.txt
Date: Fri, 15 Apr 2011 12:52:10 +0200	[thread overview]
Message-ID: <1302864730.2388.237.camel@twins> (raw)
In-Reply-To: <4DA7498C.7080006@parallels.com>

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?

      reply	other threads:[~2011-04-15 10:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-14 19:22 [PATCH] Attempt to clarify "Augmented Trees" section of Documentation/rbtree.txt Rob Landley
2011-04-15 10:52 ` Peter Zijlstra [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302864730.2388.237.camel@twins \
    --to=peterz@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@xenotime.net \
    --cc=rlandley@parallels.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=venkatesh.pallipadi@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.