Lines Matching refs:pStorageBackend

322     PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pvTemplateUser;
327 if (pStorageBackend->fSyncIoPending)
330 pStorageBackend->rcReqLast = rcReq;
331 ASMAtomicWriteBool(&pStorageBackend->fSyncIoPending, false);
332 RTSemEventSignal(pStorageBackend->EventSem);
340 AssertPtr(pStorageBackend->pfnCompleted);
341 rc = pStorageBackend->pfnCompleted(pvUser, rcReq);
352 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)RTMemAllocZ(sizeof(DRVVDSTORAGEBACKEND));
355 if (pStorageBackend)
357 pStorageBackend->fSyncIoPending = false;
358 pStorageBackend->rcReqLast = VINF_SUCCESS;
359 pStorageBackend->pfnCompleted = pfnCompleted;
361 rc = RTSemEventCreate(&pStorageBackend->EventSem);
364 rc = PDMDrvHlpAsyncCompletionTemplateCreate(pThis->pDrvIns, &pStorageBackend->pTemplate,
365 drvvdAsyncTaskCompleted, pStorageBackend, "AsyncTaskCompleted");
380 rc = PDMR3AsyncCompletionEpCreateForFile(&pStorageBackend->pEndpoint,
382 pStorageBackend->pTemplate);
387 rc = PDMR3AsyncCompletionEpSetBwMgr(pStorageBackend->pEndpoint, pThis->pszBwGroup);
392 pszLocation, fOpen, pStorageBackend));
393 *ppStorage = pStorageBackend;
397 PDMR3AsyncCompletionEpClose(pStorageBackend->pEndpoint);
400 PDMR3AsyncCompletionTemplateDestroy(pStorageBackend->pTemplate);
402 RTSemEventDestroy(pStorageBackend->EventSem);
404 RTMemFree(pStorageBackend);
415 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
417 PDMR3AsyncCompletionEpClose(pStorageBackend->pEndpoint);
418 PDMR3AsyncCompletionTemplateDestroy(pStorageBackend->pTemplate);
419 RTSemEventDestroy(pStorageBackend->EventSem);
420 RTMemFree(pStorageBackend);
429 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
433 bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
438 int rc = PDMR3AsyncCompletionEpRead(pStorageBackend->pEndpoint, uOffset, &DataSeg, 1, cbRead, NULL, &pTask);
445 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT);
449 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false);
454 return pStorageBackend->rcReqLast;
461 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
465 bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
470 int rc = PDMR3AsyncCompletionEpWrite(pStorageBackend->pEndpoint, uOffset, &DataSeg, 1, cbWrite, NULL, &pTask);
477 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT);
481 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false);
486 return pStorageBackend->rcReqLast;
492 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
497 bool fOld = ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, true);
500 int rc = PDMR3AsyncCompletionEpFlush(pStorageBackend->pEndpoint, NULL, &pTask);
508 rc = RTSemEventWait(pStorageBackend->EventSem, RT_INDEFINITE_WAIT);
512 ASMAtomicXchgBool(&pStorageBackend->fSyncIoPending, false);
514 return pStorageBackend->rcReqLast;
523 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
525 int rc = PDMR3AsyncCompletionEpRead(pStorageBackend->pEndpoint, uOffset, paSegments, (unsigned)cSegments, cbRead,
539 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
541 int rc = PDMR3AsyncCompletionEpWrite(pStorageBackend->pEndpoint, uOffset, paSegments, (unsigned)cSegments, cbWrite,
553 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
555 int rc = PDMR3AsyncCompletionEpFlush(pStorageBackend->pEndpoint, pvCompletion,
566 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
568 return PDMR3AsyncCompletionEpGetSize(pStorageBackend->pEndpoint, pcbSize);
574 PDRVVDSTORAGEBACKEND pStorageBackend = (PDRVVDSTORAGEBACKEND)pStorage;
576 return PDMR3AsyncCompletionEpSetSize(pStorageBackend->pEndpoint, cbSize);