The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Pekka Enberg <penberg@cs.helsinki.fi>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Woodhouse <David.Woodhouse@intel.com>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Documentation: Update augmented rbtree documentation
Date: Mon, 16 May 2011 12:38:45 +0200	[thread overview]
Message-ID: <20110516103845.GB19837@elte.hu> (raw)
In-Reply-To: <1305539802-12509-1-git-send-email-levinsasha928@gmail.com>


* Sasha Levin <levinsasha928@gmail.com> wrote:

> Current documentation referred to the old method
> of handling augmented trees. Update documentation
> to correspond with the changes done in commit
> b945d6b2554d550fe95caadc61e521c0ad71fb9c.

>  Augmented rbtree is an rbtree with "some" additional data stored in each node.
>  This data can be used to augment some new functionality to rbtree.
>  Augmented rbtree is an optional feature built on top of basic rbtree
> +infrastructure. rbtree user who wants this feature will have to call the

s/rbtree user/An rbtree user

> +augmentation functions with the user provided augmentation callback
> +when inserting and erasing nodes.
> +
> +On insertion, The user must call rb_augment_insert() once the new node is in
> +place. This will cause the augmentation function callback to be called for
> +each node between the new node and the root which have been affected by the
> +insertion.
> +
> +When erasing a node, The user must call rb_augment_erase_begin() first to
> +retrieve the deepest node on the rebalance path. Then, After erasing the
> +original node, the user must call rb_augment_erase_end() with the deepest
> +node found earlier. This will cause the augmentation function to be called
> +for each affected node between the deepest node and the root.

Acked-by: Ingo Molnar <mingo@elte.hu>

Thanks,

	Ingo

  parent reply	other threads:[~2011-05-16 10:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-16  9:56 [PATCH] Documentation: Update augmented rbtree documentation Sasha Levin
2011-05-16 10:10 ` Peter Zijlstra
2011-05-16 10:38 ` Ingo Molnar [this message]
2011-05-16 14:56 ` Randy Dunlap
2011-05-16 16:44   ` Ingo Molnar

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=20110516103845.GB19837@elte.hu \
    --to=mingo@elte.hu \
    --cc=David.Woodhouse@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=penberg@cs.helsinki.fi \
    --cc=torvalds@linux-foundation.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox