struct windowsaio_data *wd;
};
-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, 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);
-static void fio_windowsaio_cleanup(struct thread_data *td);
static DWORD WINAPI IoCompletionRoutine(LPVOID lpParameter);
-static int fio_windowsaio_init(struct thread_data *td);
-static int fio_windowsaio_open_file(struct thread_data *td, struct fio_file *f);
-static int fio_windowsaio_close_file(struct thread_data fio_unused *td, struct fio_file *f);
static int fio_windowsaio_init(struct thread_data *td)
{
if (!rc)
{
+ DWORD threadid;
+
ctx->iocp = hFile;
ctx->wd = wd;
- wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, NULL);
- if (wd->iothread == NULL)
+ wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid);
+
+ if (wd->iothread != NULL)
+ fio_setaffinity(threadid, td->o.cpumask);
+ else
log_err("windowsaio: failed to create io completion thread\n");
}
}
}
-
static int fio_windowsaio_open_file(struct thread_data *td, struct fio_file *f)
{
int rc = 0;