• Home
  • Raw
  • Download

Lines Matching refs:wd

35 	struct windowsaio_data *wd;  member
52 struct windowsaio_data *wd; in fio_windowsaio_init() local
55 wd = calloc(1, sizeof(struct windowsaio_data)); in fio_windowsaio_init()
56 if (wd == NULL) { in fio_windowsaio_init()
62 wd->aio_events = malloc(td->o.iodepth * sizeof(struct io_u*)); in fio_windowsaio_init()
63 if (wd->aio_events == NULL) { in fio_windowsaio_init()
71 wd->iocomplete_event = CreateEvent(NULL, FALSE, FALSE, NULL); in fio_windowsaio_init()
72 if (wd->iocomplete_event == NULL) { in fio_windowsaio_init()
79 if (wd != NULL) { in fio_windowsaio_init()
80 if (wd->aio_events != NULL) in fio_windowsaio_init()
81 free(wd->aio_events); in fio_windowsaio_init()
83 free(wd); in fio_windowsaio_init()
87 td->io_ops_data = wd; in fio_windowsaio_init()
91 struct windowsaio_data *wd; in fio_windowsaio_init() local
100 wd = td->io_ops_data; in fio_windowsaio_init()
101 wd->iothread_running = TRUE; in fio_windowsaio_init()
102 wd->iocp = hFile; in fio_windowsaio_init()
119 ctx->wd = wd; in fio_windowsaio_init()
120 wd->iothread = CreateThread(NULL, 0, IoCompletionRoutine, ctx, 0, &threadid); in fio_windowsaio_init()
122 if (wd->iothread != NULL) in fio_windowsaio_init()
128 if (rc || wd->iothread == NULL) in fio_windowsaio_init()
137 struct windowsaio_data *wd; in fio_windowsaio_cleanup() local
139 wd = td->io_ops_data; in fio_windowsaio_cleanup()
141 if (wd != NULL) { in fio_windowsaio_cleanup()
142 wd->iothread_running = FALSE; in fio_windowsaio_cleanup()
143 WaitForSingleObject(wd->iothread, INFINITE); in fio_windowsaio_cleanup()
145 CloseHandle(wd->iothread); in fio_windowsaio_cleanup()
146 CloseHandle(wd->iocomplete_event); in fio_windowsaio_cleanup()
148 free(wd->aio_events); in fio_windowsaio_cleanup()
149 free(wd); in fio_windowsaio_cleanup()
212 struct windowsaio_data *wd; in fio_windowsaio_open_file() local
214 wd = td->io_ops_data; in fio_windowsaio_open_file()
216 if (CreateIoCompletionPort(f->hFile, wd->iocp, 0, 0) == NULL) { in fio_windowsaio_open_file()
259 struct windowsaio_data *wd = td->io_ops_data; in fio_windowsaio_event() local
260 return wd->aio_events[event]; in fio_windowsaio_event()
267 struct windowsaio_data *wd = td->io_ops_data; in fio_windowsaio_getevents() local
292 wd->aio_events[dequeued] = io_u; in fio_windowsaio_getevents()
301 status = WaitForSingleObject(wd->iocomplete_event, mswait); in fio_windowsaio_getevents()
372 struct windowsaio_data *wd; in IoCompletionRoutine() local
378 wd = ctx->wd; in IoCompletionRoutine()
396 SetEvent(wd->iocomplete_event); in IoCompletionRoutine()
397 } while (ctx->wd->iothread_running); in IoCompletionRoutine()