Lines Matching refs:hole_index
56 static inline void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e);
57 static inline void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e);
133 void min_heap_shift_up_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_up_() argument
135 unsigned parent = (hole_index - 1) / 2; in min_heap_shift_up_()
136 while (hole_index && min_heap_elem_greater(s->p[parent], e)) in min_heap_shift_up_()
138 (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_()
139 hole_index = parent; in min_heap_shift_up_()
140 parent = (hole_index - 1) / 2; in min_heap_shift_up_()
142 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_up_()
145 void min_heap_shift_down_(min_heap_t* s, unsigned hole_index, struct event* e) in min_heap_shift_down_() argument
147 unsigned min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
153 (s->p[hole_index] = s->p[min_child])->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_down_()
154 hole_index = min_child; in min_heap_shift_down_()
155 min_child = 2 * (hole_index + 1); in min_heap_shift_down_()
157 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index; in min_heap_shift_down_()