Lines Matching defs:state
140 static error_t parse_arg(int key, char *arg, struct argp_state *state)
155 argp_usage(state);
162 argp_usage(state);
169 argp_usage(state);
176 argp_usage(state);
187 argp_usage(state);
195 argp_usage(state);
202 argp_usage(state);
302 } state;
370 state.producers = calloc(env.producer_cnt, sizeof(*state.producers));
371 state.consumers = calloc(env.consumer_cnt, sizeof(*state.consumers));
372 state.results = calloc(env.duration_sec + env.warmup_sec + 2,
373 sizeof(*state.results));
374 if (!state.producers || !state.consumers || !state.results)
383 err = pthread_create(&state.consumers[i], NULL,
391 set_thread_affinity(state.consumers[i],
402 err = pthread_create(&state.producers[i], NULL,
410 set_thread_affinity(state.producers[i],
421 int iter = state.res_cnt++;
422 struct bench_res *res = &state.results[iter];
460 bench->report_final(state.results + env.warmup_sec,
461 state.res_cnt - env.warmup_sec);