Lines Matching defs:th
464 struct thread *th, pid_t pid)
468 if (pid == thread__pid(th) || pid == -1 || thread__pid(th) != -1)
471 thread__set_pid(th, pid);
473 if (thread__pid(th) == thread__tid(th))
476 leader = machine__findnew_thread(machine, thread__pid(th), thread__pid(th));
486 if (thread__maps(th) == thread__maps(leader))
489 if (thread__maps(th)) {
495 if (!maps__empty(thread__maps(th)))
497 thread__pid(th), thread__tid(th));
498 maps__put(thread__maps(th));
501 thread__set_maps(th, maps__get(thread__maps(leader)));
506 pr_err("Failed to join map groups for %d:%d\n", thread__pid(th), thread__tid(th));
519 struct thread *th = threads__find(&machine->threads, tid);
522 if (th) {
523 machine__update_thread_pid(machine, th, pid);
524 return th;
529 th = threads__findnew(&machine->threads, pid, tid, &created);
539 if (thread__init_maps(th, machine)) {
541 threads__remove(&machine->threads, th);
542 thread__put(th);
546 machine__update_thread_pid(machine, th, pid);
548 return th;
1905 void machine__remove_thread(struct machine *machine, struct thread *th)
1907 return threads__remove(&machine->threads, th);