6 typedef void (workqueue_fn)(struct thread_data *, struct io_u *);
9 unsigned int max_workers;
11 struct thread_data *td;
15 struct submit_worker *workers;
16 unsigned int next_free_worker;
18 pthread_cond_t flush_cond;
19 pthread_mutex_t flush_lock;
20 pthread_mutex_t stat_lock;
21 volatile int wake_idle;
24 int workqueue_init(struct thread_data *td, struct workqueue *wq, workqueue_fn *fn, unsigned int max_workers);
25 void workqueue_exit(struct workqueue *wq);
27 int workqueue_enqueue(struct workqueue *wq, struct io_u *io_u);
28 void workqueue_flush(struct workqueue *wq);