Get rid of lockfile callback
[fio.git] / engines / windowsaio.c
index f32c3563dcc50417930829c253a558159ff174e7..ec8222c90c9f89cba4d16e2f7f5e9f336a639c14 100644 (file)
@@ -9,7 +9,6 @@
 #include <unistd.h>
 #include <signal.h>
 #include <errno.h>
-#include <windows.h>
 
 #include "../fio.h"
 
@@ -38,7 +37,7 @@ struct thread_ctx {
 
 static BOOL timeout_expired(DWORD start_count, DWORD end_count);
 static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
-                                       unsigned int max, struct timespec *t);
+                               unsigned int max, const struct timespec *t);
 static struct io_u *fio_windowsaio_event(struct thread_data *td, int event);
 static int fio_windowsaio_queue(struct thread_data *td,
                                  struct io_u *io_u);
@@ -257,12 +256,13 @@ static struct io_u* fio_windowsaio_event(struct thread_data *td, int event)
 }
 
 static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
-                                       unsigned int max, struct timespec *t)
+                                   unsigned int max,
+                                   const struct timespec *t)
 {
        struct windowsaio_data *wd = td->io_ops->data;
-       struct flist_head *entry;
        unsigned int dequeued = 0;
        struct io_u *io_u;
+       int i;
        struct fio_overlapped *fov;
        DWORD start_count = 0;
        DWORD end_count = 0;
@@ -276,8 +276,10 @@ static int fio_windowsaio_getevents(struct thread_data *td, unsigned int min,
        }
 
        do {
-               flist_for_each(entry, &td->io_u_busylist) {
-                       io_u = flist_entry(entry, struct io_u, list);
+               io_u_qiter(&td->io_u_all, io_u, i) {
+                       if (!(io_u->flags & IO_U_F_FLIGHT))
+                               continue;
+
                        fov = (struct fio_overlapped*)io_u->engine_data;
 
                        if (fov->io_complete) {