Lines Matching defs:pFile

188     PRTAIOMGRFILEINT  pFile;
234 static int rtAioMgrReqsEnqueue(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile,
244 static bool rtAioMgrFileRemove(PRTAIOMGRFILEINT pFile)
247 if (!pFile->AioMgr.cReqsActive)
249 RTListNodeRemove(&pFile->AioMgr.NodeAioMgrFiles);
284 RTAioMgrFileRelease(pReq->pFile);
292 PRTAIOMGRFILEINT pFile;
294 pFile = pReq->pFile;
296 pFile->AioMgr.cReqsActive--;
306 pFile->pfnReqCompleted(pFile, rcReq, pReq->pvUser);
345 rc = RTFileAioReqPrepareRead(pReq->hReqIo, pFile->hFile, offStart,
352 rc = RTFileAioReqPrepareWrite(pReq->hReqIo, pFile->hFile, offStart,
357 rc = rtAioMgrReqsEnqueue(pThis, pFile, &pReq->hReqIo, 1);
374 rc = RTFileAioReqPrepareWrite(pReq->hReqIo, pFile->hFile,
377 rc = rtAioMgrReqsEnqueue(pThis, pFile, &pReq->hReqIo, 1);
392 pFile->pfnReqCompleted(pFile, rcReq, pReq->pvUser);
413 static int rtAioMgrReqsEnqueue(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile,
417 pFile->AioMgr.cReqsActive += cReqs;
434 RTListAppend(&pFile->AioMgr.ListWaitingReqs, &pReq->NodeWaitingList);
436 pFile->AioMgr.cReqsActive--;
454 rc = rtAioMgrReqsEnqueue(pThis, pFile, &pahReqs[i], 1);
470 * @param pFile The file instance to add the requests to.
473 static void rtAioMgrFileAddReqsToWaitingList(PRTAIOMGRFILEINT pFile, PRTAIOMGRREQ pReqsHead)
481 RTListAppend(&pFile->AioMgr.ListWaitingReqs, &pReqCur->NodeWaitingList);
490 * @param pFile The file instance data.
493 static int rtAioMgrReqPrepareNonBuffered(PRTAIOMGRFILEINT pFile, PRTAIOMGRREQ pReq)
549 rc = RTFileAioReqPrepareWrite(pReq->hReqIo, pFile->hFile,
553 rc = RTFileAioReqPrepareRead(pReq->hReqIo, pFile->hFile,
572 PRTAIOMGRFILEINT pFile = pReq->pFile;
578 rc = RTFileAioReqPrepareFlush(pReq->hReqIo, pFile->hFile, pReq);
584 rc = rtAioMgrReqPrepareNonBuffered(pFile, pReq);
602 * @param pFile The file instance.
606 PRTAIOMGRFILEINT pFile,
622 AssertMsg(VALID_PTR(pCurr->pFile) && (pCurr->pFile == pFile),
636 rc = rtAioMgrReqsEnqueue(pThis, pFile, apReqs, cRequests);
645 rc = rtAioMgrReqsEnqueue(pThis, pFile, apReqs, cRequests);
653 rtAioMgrFileAddReqsToWaitingList(pFile, pReqsNew);
668 * @param pFile The file to get the requests from.
670 static int rtAioMgrQueueWaitingReqs(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
679 RTListForEachSafe(&pFile->AioMgr.ListWaitingReqs, pReqIt, pReqItNext, RTAIOMGRREQ, NodeWaitingList)
682 AssertMsg(VALID_PTR(pReqIt->pFile) && (pReqIt->pFile == pFile),
702 rc = rtAioMgrReqsEnqueue(pThis, pFile, apReqs, cRequests);
711 rc = rtAioMgrReqsEnqueue(pThis, pFile, apReqs, cRequests);
728 * @param pFile The file to get the requests from.
730 static int rtAioMgrQueueReqs(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
736 if (!RTListIsEmpty(&pFile->AioMgr.ListWaitingReqs))
737 rc = rtAioMgrQueueWaitingReqs(pThis, pFile);
740 && RTListIsEmpty(&pFile->AioMgr.ListWaitingReqs))
742 PRTAIOMGRREQ pReqsNew = (PRTAIOMGRREQ)RTQueueAtomicRemoveAll(&pFile->QueueReqs);
746 rc = rtAioMgrPrepareNewReqs(pThis, pFile, pReqsNew);
793 PRTAIOMGRFILEINT pFile = ASMAtomicReadPtrT(&pThis->BlockingEventData.pFileAdd, PRTAIOMGRFILEINT);
794 AssertMsg(VALID_PTR(pFile), ("Adding file event without a file to add\n"));
796 RTListAppend(&pThis->ListFiles, &pFile->AioMgr.NodeAioMgrFiles);
802 PRTAIOMGRFILEINT pFile = ASMAtomicReadPtrT(&pThis->BlockingEventData.pFileClose, PRTAIOMGRFILEINT);
803 AssertMsg(VALID_PTR(pFile), ("Close file event without a file to close\n"));
805 if (!(pFile->fFlags & RTAIOMGRFILE_FLAGS_CLOSING))
808 rc = rtAioMgrQueueReqs(pThis, pFile);
811 pFile->fFlags |= RTAIOMGRFILE_FLAGS_CLOSING;
812 fNotifyWaiter = !rtAioMgrFileRemove(pFile);
814 else if (!pFile->AioMgr.cReqsActive)
925 * @param pFile The file to add.
927 static int rtAioMgrAddFile(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
930 ASMAtomicWritePtr(&pFile->pAioMgr, pThis);
935 ASMAtomicWritePtr(&pThis->BlockingEventData.pFileAdd, pFile);
948 * @param pFile The file to remove.
950 static int rtAioMgrCloseFile(PRTAIOMGRINT pThis, PRTAIOMGRFILEINT pFile)
955 ASMAtomicWritePtr(&pThis->BlockingEventData.pFileClose, pFile);
1051 PRTAIOMGRFILEINT pFile = hAioMgrFile;
1054 AssertPtrReturn(pFile, VERR_INVALID_HANDLE);
1055 pAioMgr = pFile->pAioMgr;
1066 pReq->pFile = pFile;
1069 rtAioMgrFileQueueReq(pFile, pReq);
1296 PRTAIOMGRFILEINT pFile = hAioMgrFile;
1299 AssertPtrReturn(pFile, VERR_INVALID_HANDLE);
1301 pAioMgr = pFile->pAioMgr;
1307 pReq->pFile = pFile;
1310 rtAioMgrFileQueueReq(pFile, pReq);