Lines Matching refs:worker
26 struct worker { struct
34 static struct worker *worker; argument
82 struct worker *w = (struct worker *) arg; in workerfn()
119 static void create_threads(struct worker *w, pthread_attr_t thread_attr, in create_threads()
128 worker[i].tid = i; in create_threads()
131 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads()
132 if (!worker[i].futex) in create_threads()
135 worker[i].futex = &global_futex; in create_threads()
143 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) in create_threads()
171 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
172 if (!worker) in bench_futex_lock_pi()
190 create_threads(worker, thread_attr, cpu); in bench_futex_lock_pi()
203 ret = pthread_join(worker[i].thread, NULL); in bench_futex_lock_pi()
214 unsigned long t = worker[i].ops/runtime.tv_sec; in bench_futex_lock_pi()
219 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi()
222 zfree(&worker[i].futex); in bench_futex_lock_pi()
227 free(worker); in bench_futex_lock_pi()