Changeset 79983 in vbox for trunk/src/VBox/Runtime/common/ioqueue
- Timestamp:
- Jul 25, 2019 5:21:24 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132417
- Location:
- trunk/src/VBox/Runtime/common/ioqueue
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ioqueue/ioqueue-aiofile-provider.cpp
r79951 r79983 88 88 /** @interface_method_impl{RTIOQUEUEPROVVTABLE,pfnQueueInit} */ 89 89 static DECLCALLBACK(int) rtIoQueueAioFileProv_QueueInit(RTIOQUEUEPROV hIoQueueProv, uint32_t fFlags, 90 size_t cSqEntries, size_t cCqEntries)90 uint32_t cSqEntries, uint32_t cCqEntries) 91 91 { 92 92 RT_NOREF(fFlags, cCqEntries); … … 96 96 97 97 pThis->cReqsToCommitMax = cSqEntries; 98 pThis->cReqsFreeMax = (uint32_t)cSqEntries;98 pThis->cReqsFreeMax = cSqEntries; 99 99 pThis->cReqsFree = 0; 100 100 … … 105 105 if (RT_LIKELY(pThis->pahReqsFree)) 106 106 { 107 rc = RTFileAioCtxCreate(&pThis->hAioCtx, (uint32_t)cSqEntries, RTFILEAIOCTX_FLAGS_WAIT_WITHOUT_PENDING_REQUESTS);107 rc = RTFileAioCtxCreate(&pThis->hAioCtx, cSqEntries, RTFILEAIOCTX_FLAGS_WAIT_WITHOUT_PENDING_REQUESTS); 108 108 if (RT_SUCCESS(rc)) 109 109 return VINF_SUCCESS; … … 251 251 RTFILEAIOREQ hReq = ahReqs[i]; 252 252 253 paCEvt[idxCEvt].rcReq = RTFileAioReqGetRC(hReq, NULL);254 paCEvt[idxCEvt].pvUser = RTFileAioReqGetUser(hReq);253 paCEvt[idxCEvt].rcReq = RTFileAioReqGetRC(hReq, &paCEvt[idxCEvt].cbXfered); 254 paCEvt[idxCEvt].pvUser = RTFileAioReqGetUser(hReq); 255 255 idxCEvt++; 256 256 -
trunk/src/VBox/Runtime/common/ioqueue/ioqueue-stdfile-provider.cpp
r79949 r79983 102 102 { 103 103 /** Size of the submission queue in entries. */ 104 size_tcSqEntries;104 uint32_t cSqEntries; 105 105 /** Size of the completion queue in entries. */ 106 size_tcCqEntries;106 uint32_t cCqEntries; 107 107 /** Pointer to the submission queue base. */ 108 108 PRTIOQUEUESSQENTRY paSqEntryBase; … … 257 257 /** @interface_method_impl{RTIOQUEUEPROVVTABLE,pfnQueueInit} */ 258 258 static DECLCALLBACK(int) rtIoQueueStdFileProv_QueueInit(RTIOQUEUEPROV hIoQueueProv, uint32_t fFlags, 259 size_t cSqEntries, size_t cCqEntries)259 uint32_t cSqEntries, uint32_t cCqEntries) 260 260 { 261 261 RT_NOREF(fFlags); … … 264 264 int rc = VINF_SUCCESS; 265 265 266 pThis->cSqEntries 267 pThis->cCqEntries 268 pThis->idxSqProd = 0;269 pThis->idxSqCons = 0;270 pThis->idxCqProd = 0;271 pThis->idxCqCons = 0;272 pThis->fShutdown 273 pThis->fState 266 pThis->cSqEntries = cSqEntries; 267 pThis->cCqEntries = cCqEntries; 268 pThis->idxSqProd = 0; 269 pThis->idxSqCons = 0; 270 pThis->idxCqProd = 0; 271 pThis->idxCqCons = 0; 272 pThis->fShutdown = false; 273 pThis->fState = 0; 274 274 275 275 pThis->paSqEntryBase = (PRTIOQUEUESSQENTRY)RTMemAllocZ(cSqEntries * sizeof(RTIOQUEUESSQENTRY)); -
trunk/src/VBox/Runtime/common/ioqueue/ioqueuebase.cpp
r79952 r79983 128 128 129 129 RTDECL(int) RTIoQueueCreate(PRTIOQUEUE phIoQueue, PCRTIOQUEUEPROVVTABLE pProvVTable, 130 uint32_t fFlags, size_t cSqEntries, size_t cCqEntries)130 uint32_t fFlags, uint32_t cSqEntries, uint32_t cCqEntries) 131 131 { 132 132 AssertPtrReturn(phIoQueue, VERR_INVALID_POINTER); … … 142 142 pThis->pVTbl = pProvVTable; 143 143 pThis->hIoQueueProv = (RTIOQUEUEPROV)&pThis->abInst[0]; 144 pThis->cSqEntries = (uint32_t)cSqEntries;145 pThis->cCqEntries = (uint32_t)cCqEntries;144 pThis->cSqEntries = cSqEntries; 145 pThis->cCqEntries = cCqEntries; 146 146 pThis->cReqsCommitted = 0; 147 147 pThis->cReqsPrepared = 0;
Note:
See TracChangeset
for help on using the changeset viewer.