Lines Matching refs:hpos
65 int val1, val2, hpos; in move_up_lpt_heap() local
67 hpos = lprops->hpos; in move_up_lpt_heap()
68 if (!hpos) in move_up_lpt_heap()
73 int ppos = (hpos - 1) / 2; in move_up_lpt_heap()
79 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
80 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
82 lprops->hpos = ppos; in move_up_lpt_heap()
83 hpos = ppos; in move_up_lpt_heap()
84 } while (hpos); in move_up_lpt_heap()
100 struct ubifs_lprops *lprops, int hpos, int cat) in adjust_lpt_heap() argument
106 if (hpos) { in adjust_lpt_heap()
107 int ppos = (hpos - 1) / 2; in adjust_lpt_heap()
113 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap()
114 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap()
116 lprops->hpos = ppos; in adjust_lpt_heap()
117 hpos = ppos; in adjust_lpt_heap()
118 if (!hpos) in adjust_lpt_heap()
120 ppos = (hpos - 1) / 2; in adjust_lpt_heap()
132 cpos = hpos * 2 + 1; in adjust_lpt_heap()
144 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
145 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
147 lprops->hpos = cpos; in adjust_lpt_heap()
148 hpos = cpos; in adjust_lpt_heap()
158 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
159 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
161 lprops->hpos = cpos; in adjust_lpt_heap()
162 hpos = cpos; in adjust_lpt_heap()
203 lprops->hpos = cpos; in add_to_lpt_heap()
206 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
212 lprops->hpos = heap->cnt++; in add_to_lpt_heap()
213 heap->arr[lprops->hpos] = lprops; in add_to_lpt_heap()
215 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
230 int hpos = lprops->hpos; in remove_from_lpt_heap() local
233 ubifs_assert(hpos >= 0 && hpos < heap->cnt); in remove_from_lpt_heap()
234 ubifs_assert(heap->arr[hpos] == lprops); in remove_from_lpt_heap()
236 if (hpos < heap->cnt) { in remove_from_lpt_heap()
237 heap->arr[hpos] = heap->arr[heap->cnt]; in remove_from_lpt_heap()
238 heap->arr[hpos]->hpos = hpos; in remove_from_lpt_heap()
239 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat); in remove_from_lpt_heap()
261 int hpos = new_lprops->hpos; in lpt_heap_replace() local
264 heap->arr[hpos] = new_lprops; in lpt_heap_replace()
456 adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat); in change_category()
942 if (lprops->hpos != i) { in dbg_check_cats()
973 if (lprops->hpos != i) { in dbg_check_heap()
1090 if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) || in scan_check_cb()
1091 lp != heap->arr[lp->hpos]) { in scan_check_cb()