Lines Matching refs:nr_queues
197 static struct auxtrace_queue *auxtrace_alloc_queue_array(unsigned int nr_queues) in auxtrace_alloc_queue_array() argument
203 if (nr_queues > max_nr_queues) in auxtrace_alloc_queue_array()
206 queue_array = calloc(nr_queues, sizeof(struct auxtrace_queue)); in auxtrace_alloc_queue_array()
210 for (i = 0; i < nr_queues; i++) { in auxtrace_alloc_queue_array()
220 queues->nr_queues = AUXTRACE_INIT_NR_QUEUES; in auxtrace_queues__init()
221 queues->queue_array = auxtrace_alloc_queue_array(queues->nr_queues); in auxtrace_queues__init()
230 unsigned int nr_queues = queues->nr_queues; in auxtrace_queues__grow() local
234 if (!nr_queues) in auxtrace_queues__grow()
235 nr_queues = AUXTRACE_INIT_NR_QUEUES; in auxtrace_queues__grow()
237 while (nr_queues && nr_queues < new_nr_queues) in auxtrace_queues__grow()
238 nr_queues <<= 1; in auxtrace_queues__grow()
240 if (nr_queues < queues->nr_queues || nr_queues < new_nr_queues) in auxtrace_queues__grow()
243 queue_array = auxtrace_alloc_queue_array(nr_queues); in auxtrace_queues__grow()
247 for (i = 0; i < queues->nr_queues; i++) { in auxtrace_queues__grow()
256 queues->nr_queues = nr_queues; in auxtrace_queues__grow()
291 if (idx >= queues->nr_queues) { in auxtrace_queues__queue_buffer()
452 for (i = 0; i < queues->nr_queues; i++) { in auxtrace_queues__free()
464 queues->nr_queues = 0; in auxtrace_queues__free()
1022 if (idx >= queues->nr_queues) in auxtrace_queues__sample_queue()