Lines Matching refs:hpos
53 int val1, val2, hpos; in move_up_lpt_heap() local
55 hpos = lprops->hpos; in move_up_lpt_heap()
56 if (!hpos) in move_up_lpt_heap()
61 int ppos = (hpos - 1) / 2; in move_up_lpt_heap()
67 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
68 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
70 lprops->hpos = ppos; in move_up_lpt_heap()
71 hpos = ppos; in move_up_lpt_heap()
72 } while (hpos); in move_up_lpt_heap()
88 struct ubifs_lprops *lprops, int hpos, int cat) in adjust_lpt_heap() argument
94 if (hpos) { in adjust_lpt_heap()
95 int ppos = (hpos - 1) / 2; in adjust_lpt_heap()
101 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap()
102 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap()
104 lprops->hpos = ppos; in adjust_lpt_heap()
105 hpos = ppos; in adjust_lpt_heap()
106 if (!hpos) in adjust_lpt_heap()
108 ppos = (hpos - 1) / 2; in adjust_lpt_heap()
120 cpos = hpos * 2 + 1; in adjust_lpt_heap()
132 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
133 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
135 lprops->hpos = cpos; in adjust_lpt_heap()
136 hpos = cpos; in adjust_lpt_heap()
146 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
147 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
149 lprops->hpos = cpos; in adjust_lpt_heap()
150 hpos = cpos; in adjust_lpt_heap()
191 lprops->hpos = cpos; in add_to_lpt_heap()
194 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
200 lprops->hpos = heap->cnt++; in add_to_lpt_heap()
201 heap->arr[lprops->hpos] = lprops; in add_to_lpt_heap()
203 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
218 int hpos = lprops->hpos; in remove_from_lpt_heap() local
221 ubifs_assert(c, hpos >= 0 && hpos < heap->cnt); in remove_from_lpt_heap()
222 ubifs_assert(c, heap->arr[hpos] == lprops); in remove_from_lpt_heap()
224 if (hpos < heap->cnt) { in remove_from_lpt_heap()
225 heap->arr[hpos] = heap->arr[heap->cnt]; in remove_from_lpt_heap()
226 heap->arr[hpos]->hpos = hpos; in remove_from_lpt_heap()
227 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat); in remove_from_lpt_heap()
247 int hpos = new_lprops->hpos; in lpt_heap_replace() local
250 heap->arr[hpos] = new_lprops; in lpt_heap_replace()
448 adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat); in change_category()
936 if (lprops->hpos != i) { in dbg_check_cats()
967 if (lprops->hpos != i) { in dbg_check_heap()
1073 if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) || in scan_check_cb()
1074 lp != heap->arr[lp->hpos]) { in scan_check_cb()