497baa6c89f5791618bcdea97ee34b4ba6c01582
[fio.git] / engines / fio-engine-skeleton_external.c
1 /*
2  * Skeleton for a sample external io engine
3  *
4  * Should be compiled with:
5  *
6  * gcc -Wall -O2 -g -shared -rdynamic -fPIC -o engine.o engine.c
7  *
8  */
9 #include <stdio.h>
10 #include <stdlib.h>
11 #include <unistd.h>
12 #include <errno.h>
13 #include <assert.h>
14
15 #include "../fio.h"
16 #include "../os.h"
17
18 /*
19  * The core of the module is identical to the ones included with fio,
20  * read those. You cannot use register_ioengine() and unregister_ioengine()
21  * for external modules, they should be gotten through dlsym()
22  */
23
24 /*
25  * Note that the structure is exported, so that fio can get it via
26  * dlsym(..., "ioengine");
27  */
28 struct ioengine_ops ioengine = {
29         .name           = "engine_name",
30         .version        = FIO_IOOPS_VERSION,
31         .init           = fio_skeleton_init,
32         .prep           = fio_skeleton_prep,
33         .queue          = fio_skeleton_queue,
34         .getevents      = fio_skeleton_getevents,
35         .event          = fio_skeleton_event,
36         .cleanup        = fio_skeleton_cleanup,
37 };