Lines Matching refs:nr_queues
149 static struct auxtrace_queue *auxtrace_alloc_queue_array(unsigned int nr_queues) in auxtrace_alloc_queue_array() argument
155 if (nr_queues > max_nr_queues) in auxtrace_alloc_queue_array()
158 queue_array = calloc(nr_queues, sizeof(struct auxtrace_queue)); in auxtrace_alloc_queue_array()
162 for (i = 0; i < nr_queues; i++) { in auxtrace_alloc_queue_array()
172 queues->nr_queues = AUXTRACE_INIT_NR_QUEUES; in auxtrace_queues__init()
173 queues->queue_array = auxtrace_alloc_queue_array(queues->nr_queues); in auxtrace_queues__init()
182 unsigned int nr_queues = queues->nr_queues; in auxtrace_queues__grow() local
186 if (!nr_queues) in auxtrace_queues__grow()
187 nr_queues = AUXTRACE_INIT_NR_QUEUES; in auxtrace_queues__grow()
189 while (nr_queues && nr_queues < new_nr_queues) in auxtrace_queues__grow()
190 nr_queues <<= 1; in auxtrace_queues__grow()
192 if (nr_queues < queues->nr_queues || nr_queues < new_nr_queues) in auxtrace_queues__grow()
195 queue_array = auxtrace_alloc_queue_array(nr_queues); in auxtrace_queues__grow()
199 for (i = 0; i < queues->nr_queues; i++) { in auxtrace_queues__grow()
208 queues->nr_queues = nr_queues; in auxtrace_queues__grow()
243 if (idx >= queues->nr_queues) { in auxtrace_queues__queue_buffer()
408 for (i = 0; i < queues->nr_queues; i++) { in auxtrace_queues__free()
420 queues->nr_queues = 0; in auxtrace_queues__free()