Lines Matching defs:worker
43 struct worker {
73 struct worker *w = (struct worker *) arg;
130 struct worker *worker = NULL;
158 worker = calloc(params.nthreads, sizeof(*worker));
159 if (!worker)
183 worker[i].tid = i;
184 worker[i].futex = calloc(params.nfutexes, sizeof(*worker[i].futex));
185 if (!worker[i].futex)
196 ret = pthread_create(&worker[i].thread, &thread_attr, workerfn,
197 (void *)(struct worker *) &worker[i]);
217 ret = pthread_join(worker[i].thread, NULL);
229 worker[i].ops / bench__runtime.tv_sec : 0;
234 worker[i].tid, &worker[i].futex[0], t);
237 worker[i].tid, &worker[i].futex[0],
238 &worker[i].futex[params.nfutexes-1], t);
241 zfree(&worker[i].futex);
246 free(worker);