aboutsummaryrefslogtreecommitdiffstats
path: root/lib/string.c
diff options
context:
space:
mode:
authorMichel Lespinasse <[email protected]>2019-09-25 23:46:10 +0000
committerLinus Torvalds <[email protected]>2019-09-26 00:51:39 +0000
commit6d2052d188d962ffb7ad3d413e6ffd5f276aec94 (patch)
tree2f9c1fa094a6ccf2a72773ea6c294b11094865a7 /lib/string.c
parentaugmented rbtree: add new RB_DECLARE_CALLBACKS_MAX macro (diff)
downloadkernel-6d2052d188d962ffb7ad3d413e6ffd5f276aec94.tar.gz
kernel-6d2052d188d962ffb7ad3d413e6ffd5f276aec94.zip
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/[email protected] Signed-off-by: Michel Lespinasse <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: David Howells <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Uladzislau Rezki <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/string.c')
0 files changed, 0 insertions, 0 deletions