diff options
| author | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
|---|---|---|
| committer | Michal Marek <mmarek@suse.cz> | 2010-10-27 18:15:57 -0400 |
| commit | b74b953b998bcc2db91b694446f3a2619ec32de6 (patch) | |
| tree | 6ce24caabd730f6ae9287ed0676ec32e6ff31e9d /include/linux/rbtree.h | |
| parent | abb438526201c6a79949ad45375c051b6681c253 (diff) | |
| parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) | |
Merge commit 'v2.6.36' into kbuild/misc
Update to be able to fix a recent change to scripts/basic/docproc.c
(commit eda603f).
Diffstat (limited to 'include/linux/rbtree.h')
| -rw-r--r-- | include/linux/rbtree.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h index 9c295411d01f..7066acb2c530 100644 --- a/include/linux/rbtree.h +++ b/include/linux/rbtree.h | |||
| @@ -25,10 +25,10 @@ | |||
| 25 | 25 | ||
| 26 | Some example of insert and search follows here. The search is a plain | 26 | Some example of insert and search follows here. The search is a plain |
| 27 | normal search over an ordered tree. The insert instead must be implemented | 27 | normal search over an ordered tree. The insert instead must be implemented |
| 28 | int two steps: as first thing the code must insert the element in | 28 | in two steps: First, the code must insert the element in order as a red leaf |
| 29 | order as a red leaf in the tree, then the support library function | 29 | in the tree, and then the support library function rb_insert_color() must |
| 30 | rb_insert_color() must be called. Such function will do the | 30 | be called. Such function will do the not trivial work to rebalance the |
| 31 | not trivial work to rebalance the rbtree if necessary. | 31 | rbtree, if necessary. |
| 32 | 32 | ||
| 33 | ----------------------------------------------------------------------- | 33 | ----------------------------------------------------------------------- |
| 34 | static inline struct page * rb_search_page_cache(struct inode * inode, | 34 | static inline struct page * rb_search_page_cache(struct inode * inode, |
| @@ -139,6 +139,14 @@ static inline void rb_set_color(struct rb_node *rb, int color) | |||
| 139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); | 139 | extern void rb_insert_color(struct rb_node *, struct rb_root *); |
| 140 | extern void rb_erase(struct rb_node *, struct rb_root *); | 140 | extern void rb_erase(struct rb_node *, struct rb_root *); |
| 141 | 141 | ||
| 142 | typedef void (*rb_augment_f)(struct rb_node *node, void *data); | ||
| 143 | |||
| 144 | extern void rb_augment_insert(struct rb_node *node, | ||
| 145 | rb_augment_f func, void *data); | ||
| 146 | extern struct rb_node *rb_augment_erase_begin(struct rb_node *node); | ||
| 147 | extern void rb_augment_erase_end(struct rb_node *node, | ||
| 148 | rb_augment_f func, void *data); | ||
| 149 | |||
| 142 | /* Find logical next and previous nodes in a tree */ | 150 | /* Find logical next and previous nodes in a tree */ |
| 143 | extern struct rb_node *rb_next(const struct rb_node *); | 151 | extern struct rb_node *rb_next(const struct rb_node *); |
| 144 | extern struct rb_node *rb_prev(const struct rb_node *); | 152 | extern struct rb_node *rb_prev(const struct rb_node *); |
