Move __NR_shm* syscall numbers to x86-64 where they belong
[fio.git] / profile.h
1 #ifndef FIO_PROFILE_H
2 #define FIO_PROFILE_H
3
4 #include "flist.h"
5
6 /*
7  * Functions for overriding internal fio io_u functions
8  */
9 struct prof_io_ops {
10         int (*td_init)(struct thread_data *);
11         void (*td_exit)(struct thread_data *);
12
13         int (*fill_io_u_off)(struct thread_data *, struct io_u *);
14         int (*fill_io_u_size)(struct thread_data *, struct io_u *);
15         struct fio_file *(*get_next_file)(struct thread_data *);
16 };
17
18 struct profile_ops {
19         struct flist_head list;
20         char name[32];
21         char desc[64];
22         int flags;
23
24         /*
25          * Profile specific options
26          */
27         struct fio_option *options;
28
29         /*
30          * Called after parsing options, to prepare 'cmdline'
31          */
32         void (*prep_cmd)(void);
33
34         /*
35          * The complete command line
36          */
37         const char **cmdline;
38
39         struct prof_io_ops *io_ops;
40 };
41
42 int register_profile(struct profile_ops *);
43 void unregister_profile(struct profile_ops *);
44 int load_profile(const char *);
45 struct profile_ops *find_profile(const char *);
46 void profile_add_hooks(struct thread_data *);
47
48 int profile_td_init(struct thread_data *);
49 void profile_td_exit(struct thread_data *);
50
51 #endif