X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=workqueue.h;h=1961b2ae8b631eba3d70b5e791e5b6f387a429d0;hb=250e878ab5f26b32facbb6e134f3738aa1aa0120;hp=f732b3089d0a47dac49bcaf35e266be70fa9dfa5;hpb=f6496ba7d984b42602d2066837547eeb05b480f0;p=fio.git diff --git a/workqueue.h b/workqueue.h index f732b308..1961b2ae 100644 --- a/workqueue.h +++ b/workqueue.h @@ -17,9 +17,10 @@ struct submit_worker { uint64_t seq; struct workqueue *wq; void *private; + struct sk_out *sk_out; }; -typedef void (workqueue_work_fn)(struct submit_worker *, struct workqueue_work *); +typedef int (workqueue_work_fn)(struct submit_worker *, struct workqueue_work *); typedef bool (workqueue_pre_sleep_flush_fn)(struct submit_worker *); typedef void (workqueue_pre_sleep_fn)(struct submit_worker *); typedef int (workqueue_alloc_worker_fn)(struct submit_worker *); @@ -60,10 +61,10 @@ struct workqueue { volatile int wake_idle; }; -int workqueue_init(struct thread_data *td, struct workqueue *wq, struct workqueue_ops *ops, unsigned int max_workers); +int workqueue_init(struct thread_data *td, struct workqueue *wq, struct workqueue_ops *ops, unsigned int max_workers, struct sk_out *sk_out); void workqueue_exit(struct workqueue *wq); -bool workqueue_enqueue(struct workqueue *wq, struct workqueue_work *work); +void workqueue_enqueue(struct workqueue *wq, struct workqueue_work *work); void workqueue_flush(struct workqueue *wq); static inline bool workqueue_pre_sleep_check(struct submit_worker *sw)