• Home
  • Raw
  • Download

Lines Matching refs:a_node

52 #define rbtn_left_get(a_type, a_field, a_node)				\  argument
53 ((a_node)->a_field.rbn_left)
54 #define rbtn_left_set(a_type, a_field, a_node, a_left) do { \ argument
55 (a_node)->a_field.rbn_left = a_left; \
60 #define rbtn_right_get(a_type, a_field, a_node) \ argument
61 ((a_type *) (((intptr_t) (a_node)->a_field.rbn_right_red) \
63 #define rbtn_right_set(a_type, a_field, a_node, a_right) do { \ argument
64 (a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) a_right) \
65 | (((uintptr_t) (a_node)->a_field.rbn_right_red) & ((size_t)1))); \
69 #define rbtn_red_get(a_type, a_field, a_node) \ argument
70 ((bool) (((uintptr_t) (a_node)->a_field.rbn_right_red) \
72 #define rbtn_color_set(a_type, a_field, a_node, a_red) do { \ argument
73 (a_node)->a_field.rbn_right_red = (a_type *) ((((intptr_t) \
74 (a_node)->a_field.rbn_right_red) & ((ssize_t)-2)) \
77 #define rbtn_red_set(a_type, a_field, a_node) do { \ argument
78 (a_node)->a_field.rbn_right_red = (a_type *) (((uintptr_t) \
79 (a_node)->a_field.rbn_right_red) | ((size_t)1)); \
81 #define rbtn_black_set(a_type, a_field, a_node) do { \ argument
82 (a_node)->a_field.rbn_right_red = (a_type *) (((intptr_t) \
83 (a_node)->a_field.rbn_right_red) & ((ssize_t)-2)); \
87 #define rbt_node_new(a_type, a_field, a_rbt, a_node) do { \ argument
89 assert(((uintptr_t)(a_node) & 0x1) == 0); \
90 rbtn_left_set(a_type, a_field, (a_node), NULL); \
91 rbtn_right_set(a_type, a_field, (a_node), NULL); \
92 rbtn_red_set(a_type, a_field, (a_node)); \
96 #define rbtn_right_get(a_type, a_field, a_node) \ argument
97 ((a_node)->a_field.rbn_right)
98 #define rbtn_right_set(a_type, a_field, a_node, a_right) do { \ argument
99 (a_node)->a_field.rbn_right = a_right; \
103 #define rbtn_red_get(a_type, a_field, a_node) \ argument
104 ((a_node)->a_field.rbn_red)
105 #define rbtn_color_set(a_type, a_field, a_node, a_red) do { \ argument
106 (a_node)->a_field.rbn_red = (a_red); \
108 #define rbtn_red_set(a_type, a_field, a_node) do { \ argument
109 (a_node)->a_field.rbn_red = true; \
111 #define rbtn_black_set(a_type, a_field, a_node) do { \ argument
112 (a_node)->a_field.rbn_red = false; \
116 #define rbt_node_new(a_type, a_field, a_rbt, a_node) do { \ argument
117 rbtn_left_set(a_type, a_field, (a_node), NULL); \
118 rbtn_right_set(a_type, a_field, (a_node), NULL); \
119 rbtn_red_set(a_type, a_field, (a_node)); \
148 #define rbtn_rotate_left(a_type, a_field, a_node, r_node) do { \ argument
149 (r_node) = rbtn_right_get(a_type, a_field, (a_node)); \
150 rbtn_right_set(a_type, a_field, (a_node), \
152 rbtn_left_set(a_type, a_field, (r_node), (a_node)); \
155 #define rbtn_rotate_right(a_type, a_field, a_node, r_node) do { \ argument
156 (r_node) = rbtn_left_get(a_type, a_field, (a_node)); \
157 rbtn_left_set(a_type, a_field, (a_node), \
159 rbtn_right_set(a_type, a_field, (r_node), (a_node)); \