Lines Matching refs:hpos
56 int val1, val2, hpos; in move_up_lpt_heap() local
58 hpos = lprops->hpos; in move_up_lpt_heap()
59 if (!hpos) in move_up_lpt_heap()
64 int ppos = (hpos - 1) / 2; in move_up_lpt_heap()
70 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
71 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
73 lprops->hpos = ppos; in move_up_lpt_heap()
74 hpos = ppos; in move_up_lpt_heap()
75 } while (hpos); in move_up_lpt_heap()
91 struct ubifs_lprops *lprops, int hpos, int cat) in adjust_lpt_heap() argument
97 if (hpos) { in adjust_lpt_heap()
98 int ppos = (hpos - 1) / 2; in adjust_lpt_heap()
104 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap()
105 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap()
107 lprops->hpos = ppos; in adjust_lpt_heap()
108 hpos = ppos; in adjust_lpt_heap()
109 if (!hpos) in adjust_lpt_heap()
111 ppos = (hpos - 1) / 2; in adjust_lpt_heap()
123 cpos = hpos * 2 + 1; in adjust_lpt_heap()
135 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
136 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
138 lprops->hpos = cpos; in adjust_lpt_heap()
139 hpos = cpos; in adjust_lpt_heap()
149 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
150 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
152 lprops->hpos = cpos; in adjust_lpt_heap()
153 hpos = cpos; in adjust_lpt_heap()
194 lprops->hpos = cpos; in add_to_lpt_heap()
197 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
203 lprops->hpos = heap->cnt++; in add_to_lpt_heap()
204 heap->arr[lprops->hpos] = lprops; in add_to_lpt_heap()
206 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
221 int hpos = lprops->hpos; in remove_from_lpt_heap() local
224 ubifs_assert(hpos >= 0 && hpos < heap->cnt); in remove_from_lpt_heap()
225 ubifs_assert(heap->arr[hpos] == lprops); in remove_from_lpt_heap()
227 if (hpos < heap->cnt) { in remove_from_lpt_heap()
228 heap->arr[hpos] = heap->arr[heap->cnt]; in remove_from_lpt_heap()
229 heap->arr[hpos]->hpos = hpos; in remove_from_lpt_heap()
230 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat); in remove_from_lpt_heap()
252 int hpos = new_lprops->hpos; in lpt_heap_replace() local
255 heap->arr[hpos] = new_lprops; in lpt_heap_replace()
453 adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat); in change_category()
941 if (lprops->hpos != i) { in dbg_check_cats()
972 if (lprops->hpos != i) { in dbg_check_heap()
1078 if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) || in scan_check_cb()
1079 lp != heap->arr[lp->hpos]) { in scan_check_cb()