Lines Matching refs:min_heap_idx
66 void min_heap_elem_init_(struct event* e) { e->ev_timeout_pos.min_heap_idx = -1; }
85 e->ev_timeout_pos.min_heap_idx = -1;
93 return e->ev_timeout_pos.min_heap_idx == 0;
98 if (-1 != e->ev_timeout_pos.min_heap_idx)
101 unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
107 if (e->ev_timeout_pos.min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], last))
108 min_heap_shift_up_unconditional_(s, e->ev_timeout_pos.min_heap_idx, last);
110 min_heap_shift_down_(s, e->ev_timeout_pos.min_heap_idx, last);
111 e->ev_timeout_pos.min_heap_idx = -1;
119 if (-1 == e->ev_timeout_pos.min_heap_idx) {
122 unsigned parent = (e->ev_timeout_pos.min_heap_idx - 1) / 2;
125 if (e->ev_timeout_pos.min_heap_idx > 0 && min_heap_elem_greater(s->p[parent], e))
126 min_heap_shift_up_unconditional_(s, e->ev_timeout_pos.min_heap_idx, e);
128 min_heap_shift_down_(s, e->ev_timeout_pos.min_heap_idx, e);
158 (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index;
162 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
170 (s->p[hole_index] = s->p[parent])->ev_timeout_pos.min_heap_idx = hole_index;
174 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;
185 (s->p[hole_index] = s->p[min_child])->ev_timeout_pos.min_heap_idx = hole_index;
189 (s->p[hole_index] = e)->ev_timeout_pos.min_heap_idx = hole_index;