Loading...
Searching...
No Matches
rbtree.c File Reference
`#include <osmocom/core/linuxrbtree.h>`

## Functions

static void | __rb_rotate_left (struct rb_node *node, struct rb_root *root)
static void | __rb_rotate_right (struct rb_node *node, struct rb_root *root)
void | rb_insert_color (struct rb_node *node, struct rb_root *root)
static void | __rb_erase_color (struct rb_node *node, struct rb_node *parent, struct rb_root *root)
void | rb_erase (struct rb_node *node, struct rb_root *root)
struct rb_node * | rb_first (const struct rb_root *root)
struct rb_node * | rb_last (const struct rb_root *root)
struct rb_node * | rb_next (const struct rb_node *node)
struct rb_node * | rb_prev (const struct rb_node *node)
void | rb_replace_node (struct rb_node *victim, struct rb_node *new, struct rb_root *root)

## Function Documentation

## __rb_erase_color()

void __rb_erase_color | ( | struct rb_node * | node,
|  | struct rb_node * | parent,
|  | struct rb_root * | root )

static

References __rb_rotate_left(), __rb_rotate_right(), rb_color, rb_is_black, rb_is_red, rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_right, rb_set_black, rb_set_color(), and rb_set_red.

Referenced by rb_erase().

## __rb_rotate_left()

void __rb_rotate_left | ( | struct rb_node * | node,
|  | struct rb_root * | root )

static

References rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_right, and rb_set_parent().

Referenced by __rb_erase_color(), and rb_insert_color().

## __rb_rotate_right()

void __rb_rotate_right | ( | struct rb_node * | node,
|  | struct rb_root * | root )

static

References rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_right, and rb_set_parent().

Referenced by __rb_erase_color(), and rb_insert_color().

## rb_erase()

void rb_erase | ( | struct rb_node * | node,
|  | struct rb_root * | root )

References __rb_erase_color(), color(), RB_BLACK, rb_color, rb_left, rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_parent_color, rb_node::rb_right, and rb_set_parent().

Referenced by osmo_timer_del().

## rb_first()

struct rb_node * rb_first | ( | const struct rb_root * | root | ) |

References rb_root::rb_node.

Referenced by osmo_timers_check(), osmo_timers_prepare(), and osmo_timers_update().

## rb_insert_color()

void rb_insert_color | ( | struct rb_node * | node,
|  | struct rb_root * | root )

References __rb_rotate_left(), __rb_rotate_right(), rb_is_red, rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_right, rb_set_black, and rb_set_red.

Referenced by __add_timer().

## rb_last()

struct rb_node * rb_last | ( | const struct rb_root * | root | ) |

References rb_root::rb_node.

## rb_next()

struct rb_node * rb_next | ( | const struct rb_node * | node | ) |

References rb_parent, and rb_node::rb_right.

Referenced by osmo_timers_check(), and osmo_timers_update().

## rb_prev()

struct rb_node * rb_prev | ( | const struct rb_node * | node | ) |

References rb_node::rb_left, and rb_parent.

## rb_replace_node()

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

References rb_node::rb_left, rb_root::rb_node, rb_parent, rb_node::rb_right, and rb_set_parent().