Lines Matching refs:worker
18 struct worker { struct
26 static struct worker *worker; variable
74 struct worker *w = (struct worker *) arg; in workerfn()
109 static void create_threads(struct worker *w, pthread_attr_t thread_attr) in create_threads()
117 worker[i].tid = i; in create_threads()
120 worker[i].futex = calloc(1, sizeof(u_int32_t)); in create_threads()
121 if (!worker[i].futex) in create_threads()
124 worker[i].futex = &global_futex; in create_threads()
132 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i])) in create_threads()
158 worker = calloc(nthreads, sizeof(*worker)); in bench_futex_lock_pi()
159 if (!worker) in bench_futex_lock_pi()
177 create_threads(worker, thread_attr); in bench_futex_lock_pi()
190 ret = pthread_join(worker[i].thread, NULL); in bench_futex_lock_pi()
201 unsigned long t = worker[i].ops/runtime.tv_sec; in bench_futex_lock_pi()
206 worker[i].tid, worker[i].futex, t); in bench_futex_lock_pi()
209 free(worker[i].futex); in bench_futex_lock_pi()
214 free(worker); in bench_futex_lock_pi()