Lines Matching refs:td
34 static int thread_init(struct thread_data *td) in thread_init() argument
47 td->map = map; in thread_init()
48 td->tid = syscall(SYS_gettid); in thread_init()
50 pr_debug("tid = %d, map = %p\n", td->tid, map); in thread_init()
56 struct thread_data *td = arg; in thread_fn() local
60 if (thread_init(td)) in thread_fn()
64 ret = write(td->ready[1], &go, sizeof(int)); in thread_fn()
75 munmap(td->map, page_size); in thread_fn()
81 struct thread_data *td = &threads[i]; in thread_create() local
84 if (pipe(td->ready)) in thread_create()
87 err = pthread_create(&td->pt, NULL, thread_fn, td); in thread_create()
90 ssize_t ret = read(td->ready[0], &go, sizeof(int)); in thread_create()
94 close(td->ready[0]); in thread_create()
95 close(td->ready[1]); in thread_create()
186 struct thread_data *td = &threads[i]; in mmap_events() local
191 thread = machine__findnew_thread(machine, getpid(), td->tid); in mmap_events()
193 pr_debug("looking for map %p\n", td->map); in mmap_events()
196 (unsigned long) (td->map + 1), &al); in mmap_events()