Re: [PATCH v2 3/3] augmented rbtree: rework the RB_DECLARE_CALLBACKS macro definition

2019-07-02 Thread Michel Lespinasse
On Tue, Jul 2, 2019 at 4:52 AM Peter Zijlstra wrote: > > - Reorder the RB_DECLARE_CALLBACKS macro arguments, following the > > style of the INTERVAL_TREE_DEFINE macro, so that RBSTATIC and RBNAME > > are passed last. > > That's, IMO, a weird change. C has storage type and name first, why >

Re: [PATCH v2 3/3] augmented rbtree: rework the RB_DECLARE_CALLBACKS macro definition

2019-07-02 Thread Peter Zijlstra
On Tue, Jul 02, 2019 at 12:58:19AM -0700, Michel Lespinasse wrote: > - 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.

[PATCH v2 3/3] augmented rbtree: rework the RB_DECLARE_CALLBACKS macro definition

2019-07-02 Thread Michel Lespinasse
- 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