projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "debug: only do getpid() if we have to"
[fio.git]
/
rbtree.h
diff --git
a/rbtree.h
b/rbtree.h
index 879efa851460dbf878a126ff301ad9c7aab41213..c6cfe4a9384d8041c978d7cef4b31cc587125e65 100644
(file)
--- a/
rbtree.h
+++ b/
rbtree.h
@@
-95,10
+95,11
@@
static inline struct page * rb_insert_page_cache(struct inode * inode,
#define _LINUX_RBTREE_H
#include <stdlib.h>
#define _LINUX_RBTREE_H
#include <stdlib.h>
+#include <inttypes.h>
struct rb_node
{
struct rb_node
{
-
unsigned long
rb_parent_color;
+
intptr_t
rb_parent_color;
#define RB_RED 0
#define RB_BLACK 1
struct rb_node *rb_right;
#define RB_RED 0
#define RB_BLACK 1
struct rb_node *rb_right;
@@
-121,7
+122,7
@@
struct rb_root
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
{
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
{
- rb->rb_parent_color = (rb->rb_parent_color & 3) | (u
nsigned long
)p;
+ rb->rb_parent_color = (rb->rb_parent_color & 3) | (u
intptr_t
)p;
}
static inline void rb_set_color(struct rb_node *rb, int color)
{
}
static inline void rb_set_color(struct rb_node *rb, int color)
{
@@
-139,19
+140,13
@@
extern void rb_insert_color(struct rb_node *, struct rb_root *);
extern void rb_erase(struct rb_node *, struct rb_root *);
/* Find logical next and previous nodes in a tree */
extern void rb_erase(struct rb_node *, struct rb_root *);
/* Find logical next and previous nodes in a tree */
-extern struct rb_node *rb_next(struct rb_node *);
-extern struct rb_node *rb_prev(struct rb_node *);
extern struct rb_node *rb_first(struct rb_root *);
extern struct rb_node *rb_first(struct rb_root *);
-extern struct rb_node *rb_last(struct rb_root *);
-
-/* Fast replacement of a single node without remove/rebalance/add/rebalance */
-extern void rb_replace_node(struct rb_node *victim, struct rb_node *new,
- struct rb_root *root);
+extern struct rb_node *rb_next(const struct rb_node *);
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
struct rb_node ** rb_link)
{
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
struct rb_node ** rb_link)
{
- node->rb_parent_color = (u
nsigned long
)parent;
+ node->rb_parent_color = (u
intptr_t
)parent;
node->rb_left = node->rb_right = NULL;
*rb_link = node;
node->rb_left = node->rb_right = NULL;
*rb_link = node;