Lines Matching refs:threads

66 		struct threads *threads = &machine->threads[i];
67 threads->entries = RB_ROOT_CACHED;
68 init_rwsem(&threads->lock);
69 threads->nr = 0;
70 INIT_LIST_HEAD(&threads->dead);
71 threads->last_match = NULL;
229 struct threads *threads = &machine->threads[i];
230 down_write(&threads->lock);
231 nd = rb_first_cached(&threads->entries);
238 up_write(&threads->lock);
260 struct threads *threads = &machine->threads[i];
262 exit_rwsem(&threads->lock);
570 __threads__get_last_match(struct threads *threads, struct machine *machine,
575 th = threads->last_match;
581 thread__put(threads->last_match);
582 threads->last_match = NULL;
589 threads__get_last_match(struct threads *threads, struct machine *machine,
595 th = __threads__get_last_match(threads, machine, pid, tid);
601 __threads__set_last_match(struct threads *threads, struct thread *th)
603 thread__put(threads->last_match);
604 threads->last_match = thread__get(th);
608 threads__set_last_match(struct threads *threads, struct thread *th)
611 __threads__set_last_match(threads, th);
619 struct threads *threads,
623 struct rb_node **p = &threads->entries.rb_root.rb_node;
629 th = threads__get_last_match(threads, machine, pid, tid);
638 threads__set_last_match(threads, th);
666 rb_insert_color_cached(&nd->rb_node, &threads->entries, leftmost);
676 rb_erase_cached(&nd->rb_node, &threads->entries);
685 threads__set_last_match(threads, th);
686 ++threads->nr;
699 struct threads *threads = machine__threads(machine, tid);
702 down_write(&threads->lock);
704 up_write(&threads->lock);
711 struct threads *threads = machine__threads(machine, tid);
714 down_read(&threads->lock);
715 th = ____machine__findnew_thread(machine, threads, pid, tid, false);
716 up_read(&threads->lock);
1131 struct threads *threads = &machine->threads[i];
1133 down_read(&threads->lock);
1135 ret = fprintf(fp, "Threads: %u\n", threads->nr);
1137 for (nd = rb_first_cached(&threads->entries); nd;
1144 up_read(&threads->lock);
2056 struct threads *threads = machine__threads(machine, thread__tid(th));
2059 nd = thread_rb_node__find(th, &threads->entries.rb_root);
2061 if (threads->last_match && RC_CHK_ACCESS(threads->last_match) == RC_CHK_ACCESS(th))
2062 threads__set_last_match(threads, NULL);
2065 down_write(&threads->lock);
2070 rb_erase_cached(&nd->rb_node, &threads->entries);
2072 --threads->nr;
2077 up_write(&threads->lock);
3216 struct threads *threads;
3222 threads = &machine->threads[i];
3223 for (nd = rb_first_cached(&threads->entries); nd;