Lines Matching refs:threads
47 struct perf_thread_map *threads = thread_map__alloc(1);
49 if (threads != NULL) {
50 perf_thread_map__set_pid(threads, 0, -1);
51 threads->nr = 1;
52 refcount_set(&threads->refcnt, 1);
54 return threads;
57 static void perf_thread_map__delete(struct perf_thread_map *threads)
59 if (threads) {
62 WARN_ONCE(refcount_read(&threads->refcnt) != 0,
64 for (i = 0; i < threads->nr; i++)
65 free(perf_thread_map__comm(threads, i));
66 free(threads);
83 int perf_thread_map__nr(struct perf_thread_map *threads)
85 return threads ? threads->nr : 1;