Lines Matching full:interval

73 	struct usnic_uiom_interval_node *interval = kzalloc(sizeof(*interval),  in usnic_uiom_interval_node_alloc()  local
75 if (!interval) in usnic_uiom_interval_node_alloc()
78 interval->start = start; in usnic_uiom_interval_node_alloc()
79 interval->last = last; in usnic_uiom_interval_node_alloc()
80 interval->flags = flags; in usnic_uiom_interval_node_alloc()
81 interval->ref_cnt = ref_cnt; in usnic_uiom_interval_node_alloc()
83 return interval; in usnic_uiom_interval_node_alloc()
125 struct usnic_uiom_interval_node *interval, *tmp; in usnic_uiom_get_intervals_diff() local
135 list_for_each_entry(interval, &intersection_set, link) { in usnic_uiom_get_intervals_diff()
136 if (pivot < interval->start) { in usnic_uiom_get_intervals_diff()
137 MAKE_NODE_AND_APPEND(tmp, pivot, interval->start - 1, in usnic_uiom_get_intervals_diff()
140 pivot = interval->start; in usnic_uiom_get_intervals_diff()
148 if (pivot > interval->last) { in usnic_uiom_get_intervals_diff()
150 } else if (pivot <= interval->last && in usnic_uiom_get_intervals_diff()
151 FLAGS_EQUAL(interval->flags, flags, in usnic_uiom_get_intervals_diff()
153 pivot = interval->last + 1; in usnic_uiom_get_intervals_diff()
164 list_for_each_entry_safe(interval, tmp, diff_set, link) { in usnic_uiom_get_intervals_diff()
165 list_del(&interval->link); in usnic_uiom_get_intervals_diff()
166 kfree(interval); in usnic_uiom_get_intervals_diff()
174 struct usnic_uiom_interval_node *interval, *tmp; in usnic_uiom_put_interval_set() local
175 list_for_each_entry_safe(interval, tmp, intervals, link) in usnic_uiom_put_interval_set()
176 kfree(interval); in usnic_uiom_put_interval_set()
182 struct usnic_uiom_interval_node *interval, *tmp; in usnic_uiom_insert_interval() local
193 list_for_each_entry(interval, &intersection_set, link) { in usnic_uiom_insert_interval()
195 * Invariant - lpivot is the left edge of next interval to be in usnic_uiom_insert_interval()
198 istart = interval->start; in usnic_uiom_insert_interval()
199 ilast = interval->last; in usnic_uiom_insert_interval()
200 iref_cnt = interval->ref_cnt; in usnic_uiom_insert_interval()
201 iflags = interval->flags; in usnic_uiom_insert_interval()
233 list_for_each_entry_safe(interval, tmp, &intersection_set, link) { in usnic_uiom_insert_interval()
234 usnic_uiom_interval_tree_remove(interval, root); in usnic_uiom_insert_interval()
235 kfree(interval); in usnic_uiom_insert_interval()
238 list_for_each_entry(interval, &to_add, link) in usnic_uiom_insert_interval()
239 usnic_uiom_interval_tree_insert(interval, root); in usnic_uiom_insert_interval()
244 list_for_each_entry_safe(interval, tmp, &to_add, link) in usnic_uiom_insert_interval()
245 kfree(interval); in usnic_uiom_insert_interval()
254 struct usnic_uiom_interval_node *interval; in usnic_uiom_remove_interval() local
256 for (interval = usnic_uiom_interval_tree_iter_first(root, start, last); in usnic_uiom_remove_interval()
257 interval; in usnic_uiom_remove_interval()
258 interval = usnic_uiom_interval_tree_iter_next(interval, in usnic_uiom_remove_interval()
261 if (--interval->ref_cnt == 0) in usnic_uiom_remove_interval()
262 list_add_tail(&interval->link, removed); in usnic_uiom_remove_interval()
265 list_for_each_entry(interval, removed, link) in usnic_uiom_remove_interval()
266 usnic_uiom_interval_tree_remove(interval, root); in usnic_uiom_remove_interval()