Lines Matching refs:hpos

58 	int val1, val2, hpos;  in move_up_lpt_heap()  local
60 hpos = lprops->hpos; in move_up_lpt_heap()
61 if (!hpos) in move_up_lpt_heap()
66 int ppos = (hpos - 1) / 2; in move_up_lpt_heap()
72 heap->arr[ppos]->hpos = hpos; in move_up_lpt_heap()
73 heap->arr[hpos] = heap->arr[ppos]; in move_up_lpt_heap()
75 lprops->hpos = ppos; in move_up_lpt_heap()
76 hpos = ppos; in move_up_lpt_heap()
77 } while (hpos); in move_up_lpt_heap()
93 struct ubifs_lprops *lprops, int hpos, int cat) in adjust_lpt_heap() argument
99 if (hpos) { in adjust_lpt_heap()
100 int ppos = (hpos - 1) / 2; in adjust_lpt_heap()
106 heap->arr[ppos]->hpos = hpos; in adjust_lpt_heap()
107 heap->arr[hpos] = heap->arr[ppos]; in adjust_lpt_heap()
109 lprops->hpos = ppos; in adjust_lpt_heap()
110 hpos = ppos; in adjust_lpt_heap()
111 if (!hpos) in adjust_lpt_heap()
113 ppos = (hpos - 1) / 2; in adjust_lpt_heap()
125 cpos = hpos * 2 + 1; in adjust_lpt_heap()
137 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
138 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
140 lprops->hpos = cpos; in adjust_lpt_heap()
141 hpos = cpos; in adjust_lpt_heap()
151 heap->arr[cpos]->hpos = hpos; in adjust_lpt_heap()
152 heap->arr[hpos] = heap->arr[cpos]; in adjust_lpt_heap()
154 lprops->hpos = cpos; in adjust_lpt_heap()
155 hpos = cpos; in adjust_lpt_heap()
196 lprops->hpos = cpos; in add_to_lpt_heap()
199 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
205 lprops->hpos = heap->cnt++; in add_to_lpt_heap()
206 heap->arr[lprops->hpos] = lprops; in add_to_lpt_heap()
208 dbg_check_heap(c, heap, cat, lprops->hpos); in add_to_lpt_heap()
223 int hpos = lprops->hpos; in remove_from_lpt_heap() local
226 ubifs_assert(hpos >= 0 && hpos < heap->cnt); in remove_from_lpt_heap()
227 ubifs_assert(heap->arr[hpos] == lprops); in remove_from_lpt_heap()
229 if (hpos < heap->cnt) { in remove_from_lpt_heap()
230 heap->arr[hpos] = heap->arr[heap->cnt]; in remove_from_lpt_heap()
231 heap->arr[hpos]->hpos = hpos; in remove_from_lpt_heap()
232 adjust_lpt_heap(c, heap, heap->arr[hpos], hpos, cat); in remove_from_lpt_heap()
254 int hpos = new_lprops->hpos; in lpt_heap_replace() local
257 heap->arr[hpos] = new_lprops; in lpt_heap_replace()
455 adjust_lpt_heap(c, heap, lprops, lprops->hpos, new_cat); in change_category()
943 if (lprops->hpos != i) { in dbg_check_cats()
974 if (lprops->hpos != i) { in dbg_check_heap()
1080 if ((lp->hpos != -1 && heap->arr[lp->hpos]->lnum != lnum) || in scan_check_cb()
1081 lp != heap->arr[lp->hpos]) { in scan_check_cb()