static void free_worker(struct submit_worker *sw) { struct thread_data *td = &sw->td; fio_options_free(td); close_and_free_files(td); if (td->io_ops) close_ioengine(td); td_set_runstate(td, TD_EXITED); pthread_cond_destroy(&sw->cond); pthread_mutex_destroy(&sw->lock); }
static void io_workqueue_exit_worker_fn(struct submit_worker *sw, unsigned int *sum_cnt) { struct thread_data *td = sw->priv; (*sum_cnt)++; sum_thread_stats(&sw->wq->td->ts, &td->ts, *sum_cnt == 1); fio_options_free(td); close_and_free_files(td); if (td->io_ops) close_ioengine(td); td_set_runstate(td, TD_EXITED); }
static void put_job(struct thread_data *td) { if (td == &def_thread) return; profile_td_exit(td); flow_exit_job(td); if (td->error) log_info("fio: %s\n", td->verror); fio_options_free(td); if (td->io_ops) free_ioengine(td); memset(&threads[td->thread_number - 1], 0, sizeof(*td)); thread_number--; }