#include "rbtree.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* The common insert/search/free functions */
typedef int (*rb_compare_nodes)(struct rb_node *node1, struct rb_node *node2);
typedef int (*rb_compare_keys)(struct rb_node *node, void *key);
rb_free_nodes(root, free_func); \
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
#include <btrfs/kerncompat.h>
#endif /* BTRFS_FLAT_INCLUDES */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct rb_node {
unsigned long __rb_parent_color;
struct rb_node *rb_right;
extern struct rb_node *rb_next_postorder(const struct rb_node *);
/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
+extern void rb_replace_node(struct rb_node *victim, struct rb_node *new_node,
struct rb_root *root);
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
typeof(*pos), field); 1; }); \
pos = n)
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LINUX_RBTREE_H */
#include "rbtree.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Please note - only struct rb_augment_callbacks and the prototypes for
* rb_insert_augmented() and rb_erase_augmented() are intended to be public.
__rb_erase_color(rebalance, root, augment->rotate);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _LINUX_RBTREE_AUGMENTED_H */