Lines Matching refs:td
28 static int thread_init(struct thread_data *td) in thread_init() argument
41 td->map = map; in thread_init()
42 td->tid = syscall(SYS_gettid); in thread_init()
44 pr_debug("tid = %d, map = %p\n", td->tid, map); in thread_init()
50 struct thread_data *td = arg; in thread_fn() local
54 if (thread_init(td)) in thread_fn()
58 ret = write(td->ready[1], &go, sizeof(int)); in thread_fn()
69 munmap(td->map, page_size); in thread_fn()
75 struct thread_data *td = &threads[i]; in thread_create() local
78 if (pipe(td->ready)) in thread_create()
81 err = pthread_create(&td->pt, NULL, thread_fn, td); in thread_create()
84 ssize_t ret = read(td->ready[0], &go, sizeof(int)); in thread_create()
88 close(td->ready[0]); in thread_create()
89 close(td->ready[1]); in thread_create()
182 struct thread_data *td = &threads[i]; in mmap_events() local
186 thread = machine__findnew_thread(machine, getpid(), td->tid); in mmap_events()
188 pr_debug("looking for map %p\n", td->map); in mmap_events()
192 (unsigned long) (td->map + 1), &al); in mmap_events()