Lines Matching refs:worker
27 struct worker { struct
35 static struct worker *worker; argument
87 struct worker *w = (struct worker *) arg; in workerfn()
124 static void create_threads(struct worker *w, struct perf_cpu_map *cpu) in create_threads()
141 worker[i].tid = i; in create_threads()
144 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads()
145 if (!worker[i].futex) in create_threads()
148 worker[i].futex = &global_futex; in create_threads()
158 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) { in create_threads()
195 worker = calloc(params.nthreads, sizeof(*worker)); in bench_futex_lock_pi()
196 if (!worker) in bench_futex_lock_pi()
214 create_threads(worker, cpu); in bench_futex_lock_pi()
226 ret = pthread_join(worker[i].thread, NULL); in bench_futex_lock_pi()
238 worker[i].ops / bench__runtime.tv_sec : 0; in bench_futex_lock_pi()
243 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi()
246 zfree(&worker[i].futex); in bench_futex_lock_pi()
251 free(worker); in bench_futex_lock_pi()