Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _LINUX_RBTREE_H
     20 #define _LINUX_RBTREE_H
     21 #include <linux/kernel.h>
     22 #include <linux/stddef.h>
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 struct rb_node
     25 {
     26  unsigned long rb_parent_color;
     27 #define RB_RED 0
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29 #define RB_BLACK 1
     30  struct rb_node *rb_right;
     31  struct rb_node *rb_left;
     32 } __attribute__((aligned(sizeof(long))));
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 struct rb_root
     35 {
     36  struct rb_node *rb_node;
     37 };
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
     40 #define rb_color(r) ((r)->rb_parent_color & 1)
     41 #define rb_is_red(r) (!rb_color(r))
     42 #define rb_is_black(r) rb_color(r)
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44 #define rb_set_red(r) do { (r)->rb_parent_color &= ~1; } while (0)
     45 #define rb_set_black(r) do { (r)->rb_parent_color |= 1; } while (0)
     46 #define RB_ROOT (struct rb_root) { NULL, }
     47 #define rb_entry(ptr, type, member) container_of(ptr, type, member)
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 #define RB_EMPTY_ROOT(root) ((root)->rb_node == NULL)
     50 #define RB_EMPTY_NODE(node) (rb_parent(node) != node)
     51 #define RB_CLEAR_NODE(node) (rb_set_parent(node, node))
     52 #endif
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54