summaryrefslogtreecommitdiff
path: root/lib/string.c
diff options
context:
space:
mode:
authorMichel Lespinasse <walken@google.com>2019-09-25 16:46:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-09-25 17:51:39 -0700
commit6d2052d188d962ffb7ad3d413e6ffd5f276aec94 (patch)
tree2f9c1fa094a6ccf2a72773ea6c294b11094865a7 /lib/string.c
parent315cc066b8ae8349a27887ad7a34e1916e9797fe (diff)
augmented rbtree: rework the RB_DECLARE_CALLBACKS macro definition
Change the definition of the RBCOMPUTE function. The propagate callback repeatedly calls RBCOMPUTE as it moves from leaf to root. it wants to stop recomputing once the augmented subtree information doesn't change. This was previously checked using the == operator, but that only works when the augmented subtree information is a scalar field. This commit modifies the RBCOMPUTE function so that it now sets the augmented subtree information instead of returning it, and returns a boolean value indicating if the propagate callback should stop. The motivation for this change is that I want to introduce augmented rbtree uses where the augmented data for the subtree is a struct instead of a scalar. Link: http://lkml.kernel.org/r/20190703040156.56953-4-walken@google.com Signed-off-by: Michel Lespinasse <walken@google.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: David Howells <dhowells@redhat.com> Cc: Davidlohr Bueso <dbueso@suse.de> Cc: Uladzislau Rezki <urezki@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions