No need to cast async_exec() syscall to void * anymore
[fio.git] / engines / null.c
CommitLineData
a94ea28b
JA
1/*
2 * null engine - doesn't do any transfers. Used to test fio.
3 *
4 */
5#include <stdio.h>
6#include <stdlib.h>
7#include <unistd.h>
8#include <errno.h>
9#include <assert.h>
10
11#include "../fio.h"
12#include "../os.h"
13
36167d82 14static int fio_null_queue(struct thread_data fio_unused *td, struct io_u *io_u)
a94ea28b 15{
a94ea28b
JA
16 io_u->resid = 0;
17 io_u->error = 0;
36167d82 18 return FIO_Q_COMPLETED;
a94ea28b
JA
19}
20
21static struct ioengine_ops ioengine = {
22 .name = "null",
23 .version = FIO_IOOPS_VERSION,
a94ea28b 24 .queue = fio_null_queue,
4d9345ae 25 .flags = FIO_SYNCIO | FIO_NULLIO,
a94ea28b
JA
26};
27
28static void fio_init fio_null_register(void)
29{
30 register_ioengine(&ioengine);
31}
32
33static void fio_exit fio_null_unregister(void)
34{
35 unregister_ioengine(&ioengine);
36}