Lines Matching refs:pReqInt
140 PRTFILEAIOREQINTERNAL pReqInt = (PRTFILEAIOREQINTERNAL)RTMemAllocZ(sizeof(RTFILEAIOREQINTERNAL));
141 if (RT_UNLIKELY(!pReqInt))
144 pReqInt->pCtxInt = NULL;
145 pReqInt->fCompleted = false;
146 pReqInt->u32Magic = RTFILEAIOREQ_MAGIC;
147 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
149 *phReq = (RTFILEAIOREQ)pReqInt;
161 PRTFILEAIOREQINTERNAL pReqInt = hReq;
162 RTFILEAIOREQ_VALID_RETURN(pReqInt);
163 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
168 ASMAtomicUoWriteU32(&pReqInt->u32Magic, ~RTFILEAIOREQ_MAGIC);
169 RTMemFree(pReqInt);
184 PRTFILEAIOREQINTERNAL pReqInt = hReq;
185 RTFILEAIOREQ_VALID_RETURN(pReqInt);
186 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
192 pReqInt->enmTransferDirection = enmTransferDirection;
193 pReqInt->hFile = (HANDLE)RTFileToNative(hFile);
194 pReqInt->Overlapped.Offset = (DWORD)(off & 0xffffffff);
195 pReqInt->Overlapped.OffsetHigh = (DWORD)(off >> 32);
196 pReqInt->cbTransfer = cbTransfer;
197 pReqInt->pvBuf = pvBuf;
198 pReqInt->pvUser = pvUser;
199 pReqInt->fCompleted = false;
220 PRTFILEAIOREQINTERNAL pReqInt = hReq;
221 RTFILEAIOREQ_VALID_RETURN(pReqInt);
222 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
230 PRTFILEAIOREQINTERNAL pReqInt = hReq;
231 RTFILEAIOREQ_VALID_RETURN_RC(pReqInt, NULL);
233 return pReqInt->pvUser;
238 PRTFILEAIOREQINTERNAL pReqInt = hReq;
239 RTFILEAIOREQ_VALID_RETURN(pReqInt);
240 RTFILEAIOREQ_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_NOT_SUBMITTED);
259 PRTFILEAIOREQINTERNAL pReqInt = hReq;
260 RTFILEAIOREQ_VALID_RETURN(pReqInt);
261 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
262 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, PREPARED, VERR_FILE_AIO_NOT_SUBMITTED);
264 rc = pReqInt->Rc;
266 *pcbTransfered = pReqInt->cbTransfered;
352 PRTFILEAIOREQINTERNAL pReqInt = pahReqs[i];
355 Assert(pReqInt->cbTransfer == (DWORD)pReqInt->cbTransfer);
356 if (pReqInt->enmTransferDirection == TRANSFERDIRECTION_READ)
358 fSucceeded = ReadFile(pReqInt->hFile, pReqInt->pvBuf,
359 (DWORD)pReqInt->cbTransfer, NULL,
360 &pReqInt->Overlapped);
362 else if (pReqInt->enmTransferDirection == TRANSFERDIRECTION_WRITE)
364 fSucceeded = WriteFile(pReqInt->hFile, pReqInt->pvBuf,
365 (DWORD)pReqInt->cbTransfer, NULL,
366 &pReqInt->Overlapped);
376 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
378 pReqInt->Rc = rc;
381 RTFILEAIOREQ_SET_STATE(pReqInt, SUBMITTED);
456 PRTFILEAIOREQINTERNAL pReqInt = OVERLAPPED_2_RTFILEAIOREQINTERNAL(pOverlapped);
457 AssertPtr(pReqInt);
458 Assert(pReqInt->u32Magic == RTFILEAIOREQ_MAGIC);
461 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
463 pReqInt->cbTransfered = cbTransfered;
465 pReqInt->Rc = VINF_SUCCESS;
469 pReqInt->Rc = RTErrConvertFromWin32(errCode);
470 if (pReqInt->Rc == VERR_UNRESOLVED_ERROR)
471 LogRel(("AIO/win: Request %#p returned rc=%Rrc (native %u\n)", pReqInt, pReqInt->Rc, errCode));
474 pahReqs[cRequestsCompleted++] = (RTFILEAIOREQ)pReqInt;