/*
- * Rated submission helpers
+ * Generic workqueue offload mechanism
*
* Copyright (C) 2015 Jens Axboe <axboe@kernel.dk>
*
#include "fio.h"
#include "flist.h"
#include "workqueue.h"
-#include "lib/getrusage.h"
enum {
SW_F_IDLE = 1 << 0,
struct submit_worker *sw;
int i;
+ if (!wq->workers)
+ return;
+
for (i = 0; i < wq->max_workers; i++) {
sw = &wq->workers[i];
} while (shutdown && shutdown != wq->max_workers);
free(wq->workers);
+ wq->workers = NULL;
pthread_mutex_destroy(&wq->flush_lock);
pthread_cond_destroy(&wq->flush_cond);
pthread_mutex_destroy(&wq->stat_lock);