Lines Matching refs:task
45 struct task { struct
60 struct task *end_of_stack; argument
61 struct task insertion_list[256];
62 struct task stack[];
72 static inline void insert_key(const struct task task, sort_key_t *next) in insert_key() argument
78 while ((--next >= task.first_key) && in insert_key()
79 (compare(unsorted, next[0], task.offset, task.length) < 0)) in insert_key()
90 static inline void insertion_sort(const struct task task) in insertion_sort() argument
94 for (next = task.first_key + 1; next <= task.last_key; next++) in insertion_sort()
95 insert_key(task, next); in insertion_sort()
99 static inline void push_task(struct task **stack_pointer, sort_key_t *first_key, in push_task()
102 struct task *task = (*stack_pointer)++; in push_task() local
104 task->first_key = first_key; in push_task()
105 task->last_key = &first_key[count - 1]; in push_task()
106 task->offset = offset; in push_task()
107 task->length = length; in push_task()
122 static inline void measure_bins(const struct task task, struct histogram *bins) in measure_bins() argument
134 for (key_ptr = task.first_key; key_ptr <= task.last_key; key_ptr++) { in measure_bins()
136 u8 bin = (*key_ptr)[task.offset]; in measure_bins()
172 static inline int push_bins(struct task **stack, struct task *end_of_stack, in push_bins()
173 struct task **list, sort_key_t *pile[], in push_bins()
214 result = vdo_allocate_extended(struct radix_sorter, stack_size, struct task, in uds_make_radix_sorter()
237 struct task start; in uds_radix_sort()
240 struct task *task_stack = sorter->stack; in uds_radix_sort()
247 start = (struct task) { in uds_radix_sort()
269 const struct task task = *task_stack; in uds_radix_sort() local
270 struct task *insertion_task_list; in uds_radix_sort()
275 measure_bins(task, bins); in uds_radix_sort()
283 &insertion_task_list, pile, bins, task.first_key, in uds_radix_sort()
284 task.offset + 1, task.length - 1); in uds_radix_sort()
296 end = task.last_key - bins->size[bins->last]; in uds_radix_sort()
299 for (fence = task.first_key; fence <= end; ) { in uds_radix_sort()
307 while (--pile[bin = key[task.offset]] > fence) in uds_radix_sort()