Lines Matching refs:hole_index
57 static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e);
58 static inline void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct…
59 static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e);
149 void min_heap_shift_up_unconditional_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_unconditional_() argument
151 unsigned parent = (hole_index - 1) / 2; in min_heap_shift_up_unconditional_()
154 (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_unconditional_()
155 hole_index = parent; in min_heap_shift_up_unconditional_()
156 parent = (hole_index - 1) / 2; in min_heap_shift_up_unconditional_()
157 } while (hole_index && min_heap_elem_greater(s->p[parent], e)); in min_heap_shift_up_unconditional_()
158 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_unconditional_()
161 void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_() argument
163 unsigned parent = (hole_index - 1) / 2; in min_heap_shift_up_()
164 while (hole_index && min_heap_elem_greater(s->p[parent], e)) in min_heap_shift_up_()
166 (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_()
167 hole_index = parent; in min_heap_shift_up_()
168 parent = (hole_index - 1) / 2; in min_heap_shift_up_()
170 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_()
173 void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_down_() argument
175 unsigned min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
181 (s->p[hole_index] = s->p[min_child])->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_down_()
182 hole_index = min_child; in min_heap_shift_down_()
183 min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
185 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_down_()