Lines Matching defs:idle_threads
293 static struct thread **idle_threads;
2270 idle_threads = zalloc(ncpu * sizeof(struct thread *));
2271 if (!idle_threads)
2278 idle_threads[i] = thread__new(0, 0);
2279 if (idle_threads[i] == NULL)
2282 ret = init_idle_thread(idle_threads[i]);
2294 if (idle_threads == NULL)
2298 if ((idle_threads[i]))
2299 thread__delete(idle_threads[i]);
2302 free(idle_threads);
2311 if ((cpu >= idle_max_cpu) || (idle_threads == NULL)) {
2315 p = realloc(idle_threads, j * sizeof(struct thread *));
2319 idle_threads = (struct thread **) p;
2321 idle_threads[i] = NULL;
2327 if (idle_threads[cpu] == NULL) {
2328 idle_threads[cpu] = thread__new(0, 0);
2330 if (idle_threads[cpu]) {
2331 if (init_idle_thread(idle_threads[cpu]) < 0)
2336 return idle_threads[cpu];
2903 t = idle_threads[i];
2927 t = idle_threads[i];