Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
rbtree.h File Reference
#include <linux/kernel.h>
#include <linux/stddef.h>

Go to the source code of this file.

Data Structures

struct  rb_node
 
struct  rb_root
 

Macros

#define rb_parent(r)   ((struct rb_node *)((r)->__rb_parent_color & ~3))
 
#define RB_ROOT   (struct rb_root) { NULL, }
 
#define rb_entry(ptr, type, member)   container_of(ptr, type, member)
 
#define RB_EMPTY_ROOT(root)   ((root)->rb_node == NULL)
 
#define RB_EMPTY_NODE(node)   ((node)->__rb_parent_color == (unsigned long)(node))
 
#define RB_CLEAR_NODE(node)   ((node)->__rb_parent_color = (unsigned long)(node))
 

Functions

struct rb_node __attribute__ ((aligned(sizeof(long))))
 
void rb_insert_color (struct rb_node *, struct rb_root *)
 
void rb_erase (struct rb_node *, struct rb_root *)
 
struct rb_noderb_next (const struct rb_node *)
 
struct rb_noderb_prev (const struct rb_node *)
 
struct rb_noderb_first (const struct rb_root *)
 
struct rb_noderb_last (const struct rb_root *)
 
void rb_replace_node (struct rb_node *victim, struct rb_node *new, struct rb_root *root)
 

Variables

unsigned long __rb_parent_color
 
struct rb_noderb_right
 
struct rb_noderb_left
 
struct rb_root __attribute__
 

Macro Definition Documentation

#define RB_CLEAR_NODE (   node)    ((node)->__rb_parent_color = (unsigned long)(node))

Definition at line 57 of file rbtree.h.

#define RB_EMPTY_NODE (   node)    ((node)->__rb_parent_color == (unsigned long)(node))

Definition at line 55 of file rbtree.h.

#define RB_EMPTY_ROOT (   root)    ((root)->rb_node == NULL)

Definition at line 52 of file rbtree.h.

#define rb_entry (   ptr,
  type,
  member 
)    container_of(ptr, type, member)

Definition at line 50 of file rbtree.h.

#define rb_parent (   r)    ((struct rb_node *)((r)->__rb_parent_color & ~3))

Definition at line 47 of file rbtree.h.

#define RB_ROOT   (struct rb_root) { NULL, }

Definition at line 49 of file rbtree.h.

Function Documentation

void rb_erase ( struct rb_node ,
struct rb_root  
)

Definition at line 381 of file rbtree.c.

struct rb_node* rb_first ( const struct rb_root )
read

Definition at line 404 of file rbtree.c.

void rb_insert_color ( struct rb_node ,
struct rb_root  
)

Definition at line 375 of file rbtree.c.

struct rb_node* rb_last ( const struct rb_root )
read

Definition at line 417 of file rbtree.c.

struct rb_node* rb_next ( const struct rb_node )
read

Definition at line 430 of file rbtree.c.

struct rb_node* rb_prev ( const struct rb_node )
read

Definition at line 462 of file rbtree.c.

void rb_replace_node ( struct rb_node victim,
struct rb_node new,
struct rb_root root 
)

Definition at line 491 of file rbtree.c.

Variable Documentation

unsigned long __rb_parent_color

Definition at line 40 of file rbtree.h.

struct rb_node* rb_left

Definition at line 42 of file rbtree.h.

struct rb_node* rb_right

Definition at line 41 of file rbtree.h.