Lines Matching refs:worker
26 struct worker {
34 static struct worker *worker;
81 struct worker *w = (struct worker *) arg;
118 static void create_threads(struct worker *w, pthread_attr_t thread_attr,
127 worker[i].tid = i;
130 worker[i].futex = calloc(1, sizeof(u_int32_t));
131 if (!worker[i].futex)
134 worker[i].futex = &global_futex;
142 if (pthread_create(&w[i].thread, &thread_attr, workerfn, &worker[i]))
171 worker = calloc(nthreads, sizeof(*worker));
172 if (!worker)
190 create_threads(worker, thread_attr, cpu);
203 ret = pthread_join(worker[i].thread, NULL);
215 worker[i].ops / bench__runtime.tv_sec : 0;
220 worker[i].tid, worker[i].futex, t);
223 zfree(&worker[i].futex);
228 free(worker);