X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=workqueue.h;h=e35c181a23ea359a895a51cbab1815f279686d0b;hp=c2464b27709810dc0458fad63edda7299115fd4d;hb=d27f75b8ac13a4056cc8ef09b56de9dd184a2ad1;hpb=c35c582da92f613e56294e2d94b52a80c63c2ae3 diff --git a/workqueue.h b/workqueue.h index c2464b27..e35c181a 100644 --- a/workqueue.h +++ b/workqueue.h @@ -16,10 +16,11 @@ struct submit_worker { unsigned int index; uint64_t seq; struct workqueue *wq; - void *private; + void *priv; + 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 *); @@ -40,6 +41,8 @@ struct workqueue_ops { workqueue_init_worker_fn *init_worker_fn; workqueue_exit_worker_fn *exit_worker_fn; + + unsigned int nice; }; struct workqueue { @@ -58,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)