The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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 | *** |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 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 | *** |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_RBTREE_H |
| 20 | #define _LINUX_RBTREE_H |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/stddef.h> |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 23 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 24 | struct rb_node |
| 25 | { |
| 26 | unsigned long rb_parent_color; |
| 27 | #define RB_RED 0 |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 28 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 29 | #define RB_BLACK 1 |
| 30 | struct rb_node *rb_right; |
| 31 | struct rb_node *rb_left; |
| 32 | } __attribute__((aligned(sizeof(long)))); |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 33 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 34 | struct rb_root |
| 35 | { |
| 36 | struct rb_node *rb_node; |
| 37 | }; |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 38 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 43 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 46 | #define RB_ROOT (struct rb_root) { NULL, } |
| 47 | #define rb_entry(ptr, type, member) container_of(ptr, type, member) |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 48 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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)) |
The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 52 | #endif |
Ben Cheng | 654325d | 2012-03-07 21:13:49 -0800 | [diff] [blame^] | 53 | /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ |