Rev 4103 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4103 | Rev 5270 | ||
---|---|---|---|
Line 41... | Line 41... | ||
41 | void (*rotate)(struct rb_node *old, struct rb_node *new); |
41 | void (*rotate)(struct rb_node *old, struct rb_node *new); |
42 | }; |
42 | }; |
Line 43... | Line 43... | ||
43 | 43 | ||
44 | extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, |
44 | extern void __rb_insert_augmented(struct rb_node *node, struct rb_root *root, |
- | 45 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); |
|
- | 46 | /* |
|
- | 47 | * Fixup the rbtree and update the augmented information when rebalancing. |
|
- | 48 | * |
|
- | 49 | * On insertion, the user must update the augmented information on the path |
|
- | 50 | * leading to the inserted node, then call rb_link_node() as usual and |
|
- | 51 | * rb_augment_inserted() instead of the usual rb_insert_color() call. |
|
- | 52 | * If rb_augment_inserted() rebalances the rbtree, it will callback into |
|
- | 53 | * a user provided function to update the augmented information on the |
|
- | 54 | * affected subtrees. |
|
45 | void (*augment_rotate)(struct rb_node *old, struct rb_node *new)); |
55 | */ |
46 | static inline void |
56 | static inline void |
47 | rb_insert_augmented(struct rb_node *node, struct rb_root *root, |
57 | rb_insert_augmented(struct rb_node *node, struct rb_root *root, |
48 | const struct rb_augment_callbacks *augment) |
58 | const struct rb_augment_callbacks *augment) |
49 | { |
59 | { |