Lines Matching defs:pReqInt
328 PRTFILEAIOREQINTERNAL pReqInt = (PRTFILEAIOREQINTERNAL)RTMemAllocZ(sizeof(*pReqInt));
329 if (RT_UNLIKELY(!pReqInt))
332 pReqInt->pCtxInt = NULL;
333 pReqInt->u32Magic = RTFILEAIOREQ_MAGIC;
334 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
336 *phReq = (RTFILEAIOREQ)pReqInt;
348 PRTFILEAIOREQINTERNAL pReqInt = hReq;
349 RTFILEAIOREQ_VALID_RETURN(pReqInt);
350 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
355 ASMAtomicUoWriteU32(&pReqInt->u32Magic, ~RTFILEAIOREQ_MAGIC);
356 RTMemFree(pReqInt);
372 PRTFILEAIOREQINTERNAL pReqInt = hReq;
373 RTFILEAIOREQ_VALID_RETURN(pReqInt);
374 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
387 pReqInt->AioCB.u16IoOpCode = uTransferDirection;
388 pReqInt->AioCB.uFileDesc = RTFileToNative(hFile);
389 pReqInt->AioCB.off = off;
390 pReqInt->AioCB.cbTransfer = cbTransfer;
391 pReqInt->AioCB.pvBuf = pvBuf;
392 pReqInt->AioCB.pvUser = pvUser;
394 pReqInt->pCtxInt = NULL;
395 RTFILEAIOREQ_SET_STATE(pReqInt, PREPARED);
419 PRTFILEAIOREQINTERNAL pReqInt = hReq;
420 RTFILEAIOREQ_VALID_RETURN(pReqInt);
422 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
424 return rtFileAioReqPrepareTransfer(pReqInt, hFile, LNXKAIO_IOCB_CMD_FSYNC,
431 PRTFILEAIOREQINTERNAL pReqInt = hReq;
432 RTFILEAIOREQ_VALID_RETURN_RC(pReqInt, NULL);
434 return pReqInt->AioCB.pvUser;
440 PRTFILEAIOREQINTERNAL pReqInt = hReq;
441 RTFILEAIOREQ_VALID_RETURN(pReqInt);
442 RTFILEAIOREQ_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_NOT_SUBMITTED);
445 int rc = rtFileAsyncIoLinuxCancel(pReqInt->AioContext, &pReqInt->AioCB, &AioEvent);
452 AssertMsg(VALID_PTR(pReqInt->pCtxInt),
455 ASMAtomicDecS32(&pReqInt->pCtxInt->cRequests);
456 pReqInt->Rc = VERR_FILE_AIO_CANCELED;
457 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
468 PRTFILEAIOREQINTERNAL pReqInt = hReq;
469 RTFILEAIOREQ_VALID_RETURN(pReqInt);
471 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, SUBMITTED, VERR_FILE_AIO_IN_PROGRESS);
472 RTFILEAIOREQ_NOT_STATE_RETURN_RC(pReqInt, PREPARED, VERR_FILE_AIO_NOT_SUBMITTED);
475 && RT_SUCCESS(pReqInt->Rc))
476 *pcbTransfered = pReqInt->cbTransfered;
478 return pReqInt->Rc;
572 PRTFILEAIOREQINTERNAL pReqInt = NULL;
579 pReqInt = pahReqs[i];
580 if (RTFILEAIOREQ_IS_NOT_VALID(pReqInt))
586 pReqInt = pahReqs[iUndo];
587 RTFILEAIOREQ_SET_STATE(pReqInt, PREPARED);
588 pReqInt->pCtxInt = NULL;
593 pReqInt->AioContext = pCtxInt->AioContext;
594 pReqInt->pCtxInt = pCtxInt;
595 RTFILEAIOREQ_SET_STATE(pReqInt, SUBMITTED);
624 pReqInt = pahReqs[i];
625 pReqInt->pCtxInt = NULL;
626 pReqInt->AioContext = 0;
627 RTFILEAIOREQ_SET_STATE(pReqInt, PREPARED);
635 pReqInt = pahReqs[0];
636 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
637 pReqInt->Rc = rc;
638 pReqInt->cbTransfered = 0;
724 PRTFILEAIOREQINTERNAL pReqInt = (PRTFILEAIOREQINTERNAL)aPortEvents[i].pIoCB;
725 AssertPtr(pReqInt);
726 Assert(pReqInt->u32Magic == RTFILEAIOREQ_MAGIC);
734 pReqInt->Rc = RTErrConvertFromErrno(-aPortEvents[i].rc); /* Convert to positive value. */
737 pReqInt->Rc = VINF_SUCCESS;
738 pReqInt->cbTransfered = aPortEvents[i].rc;
742 RTFILEAIOREQ_SET_STATE(pReqInt, COMPLETED);
744 pahReqs[cRequestsCompleted++] = (RTFILEAIOREQ)pReqInt;