#define _LINUX_RBTREE_H
#include <stdlib.h>
+#include <inttypes.h>
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;
static inline void rb_set_parent(struct rb_node *rb, struct rb_node *p)
{
- rb->rb_parent_color = (rb->rb_parent_color & 3) | (unsigned long)p;
+ rb->rb_parent_color = (rb->rb_parent_color & 3) | (uintptr_t)p;
}
static inline void rb_set_color(struct rb_node *rb, int color)
{
static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
struct rb_node ** rb_link)
{
- node->rb_parent_color = (unsigned long )parent;
+ node->rb_parent_color = (uintptr_t)parent;
node->rb_left = node->rb_right = NULL;
*rb_link = node;