Lines Matching refs:worker
24 struct worker { struct
32 static struct worker *worker; argument
80 struct worker *w = (struct worker *) arg; in workerfn()
117 static void create_threads(struct worker *w, pthread_attr_t thread_attr, in create_threads()
126 worker[i].tid = i; in create_threads()
129 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads()
130 if (!worker[i].futex) in create_threads()
133 worker[i].futex = &global_futex; in create_threads()
141 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) in create_threads()
169 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
170 if (!worker) in bench_futex_lock_pi()
188 create_threads(worker, thread_attr, cpu); in bench_futex_lock_pi()
201 ret = pthread_join(worker[i].thread, NULL); in bench_futex_lock_pi()
212 unsigned long t = worker[i].ops/runtime.tv_sec; in bench_futex_lock_pi()
217 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi()
220 free(worker[i].futex); in bench_futex_lock_pi()
225 free(worker); in bench_futex_lock_pi()