cmdprio: move cmdprio function definitions to a new cmdprio.c file
[fio.git] / engines / cmdprio.h
1 /*
2  * IO priority handling declarations and helper functions common to the
3  * libaio and io_uring engines.
4  */
5
6 #ifndef FIO_CMDPRIO_H
7 #define FIO_CMDPRIO_H
8
9 #include "../fio.h"
10
11 struct cmdprio {
12         unsigned int percentage[DDIR_RWDIR_CNT];
13         unsigned int class[DDIR_RWDIR_CNT];
14         unsigned int level[DDIR_RWDIR_CNT];
15         unsigned int bssplit_nr[DDIR_RWDIR_CNT];
16         struct bssplit *bssplit[DDIR_RWDIR_CNT];
17 };
18
19 int fio_cmdprio_bssplit_parse(struct thread_data *td, const char *input,
20                               struct cmdprio *cmdprio);
21
22 int fio_cmdprio_percentage(struct cmdprio *cmdprio, struct io_u *io_u);
23
24 int fio_cmdprio_init(struct thread_data *td, struct cmdprio *cmdprio,
25                      bool *has_cmdprio);
26
27 #endif