Lines Matching refs:threads

63 		struct threads *threads = &machine->threads[i];
64 threads->entries = RB_ROOT_CACHED;
65 init_rwsem(&threads->lock);
66 threads->nr = 0;
67 INIT_LIST_HEAD(&threads->dead);
68 threads->last_match = NULL;
200 struct threads *threads = &machine->threads[i];
201 down_write(&threads->lock);
202 nd = rb_first_cached(&threads->entries);
209 up_write(&threads->lock);
229 struct threads *threads = &machine->threads[i];
232 * Forget about the dead, at this point whatever threads were
236 * its not in the dead threads list and will not try to remove it
239 list_for_each_entry_safe(thread, n, &threads->dead, node)
242 exit_rwsem(&threads->lock);
452 __threads__get_last_match(struct threads *threads, struct machine *machine,
457 th = threads->last_match;
464 threads->last_match = NULL;
471 threads__get_last_match(struct threads *threads, struct machine *machine,
477 th = __threads__get_last_match(threads, machine, pid, tid);
483 __threads__set_last_match(struct threads *threads, struct thread *th)
485 threads->last_match = th;
489 threads__set_last_match(struct threads *threads, struct thread *th)
492 __threads__set_last_match(threads, th);
500 struct threads *threads,
504 struct rb_node **p = &threads->entries.rb_root.rb_node;
509 th = threads__get_last_match(threads, machine, pid, tid);
518 threads__set_last_match(threads, th);
537 rb_insert_color_cached(&th->rb_node, &threads->entries, leftmost);
547 rb_erase_cached(&th->rb_node, &threads->entries);
556 threads__set_last_match(threads, th);
557 ++threads->nr;
571 struct threads *threads = machine__threads(machine, tid);
574 down_write(&threads->lock);
576 up_write(&threads->lock);
583 struct threads *threads = machine__threads(machine, tid);
586 down_read(&threads->lock);
587 th = ____machine__findnew_thread(machine, threads, pid, tid, false);
588 up_read(&threads->lock);
949 struct threads *threads = &machine->threads[i];
951 down_read(&threads->lock);
953 ret = fprintf(fp, "Threads: %u\n", threads->nr);
955 for (nd = rb_first_cached(&threads->entries); nd;
962 up_read(&threads->lock);
1828 struct threads *threads = machine__threads(machine, th->tid);
1830 if (threads->last_match == th)
1831 threads__set_last_match(threads, NULL);
1834 down_write(&threads->lock);
1838 rb_erase_cached(&th->rb_node, &threads->entries);
1840 --threads->nr;
1846 list_add_tail(&th->node, &threads->dead);
1850 * then we will be touching the threads->dead head when removing the
1856 up_write(&threads->lock);
2931 struct threads *threads;
2938 threads = &machine->threads[i];
2939 for (nd = rb_first_cached(&threads->entries); nd;
2947 list_for_each_entry(thread, &threads->dead, node) {