VirtualBox

Changeset 26168 in vbox for trunk


Ignore:
Timestamp:
Feb 2, 2010 8:00:05 PM (15 years ago)
Author:
vboxsync
Message:

PDM: s/pDrvHlp\(|R0|R3|RC\)/pHlp\1/g - PDMDRVINS.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdmdrv.h

    r26166 r26168  
    350350
    351351    /** Pointer the PDM Driver API. */
    352     RCPTRTYPE(PCPDMDRVHLPRC)    pDrvHlpRC;
     352    RCPTRTYPE(PCPDMDRVHLPRC)    pHlpRC;
    353353    /** Pointer to driver instance data. */
    354354    RCPTRTYPE(void *)           pvInstanceDataRC;
    355355
    356356    /** Pointer the PDM Driver API. */
    357     R0PTRTYPE(PCPDMDRVHLPR0)    pDrvHlpR0;
     357    R0PTRTYPE(PCPDMDRVHLPR0)    pHlpR0;
    358358    /** Pointer to driver instance data. */
    359359    R0PTRTYPE(void *)           pvInstanceDataR0;
    360360
    361361    /** Pointer the PDM Driver API. */
    362     R3PTRTYPE(PCPDMDRVHLPR3)    pDrvHlpR3;
     362    R3PTRTYPE(PCPDMDRVHLPR3)    pHlpR3;
    363363    /** Pointer to driver instance data. */
    364364    R3PTRTYPE(void *)           pvInstanceDataR3;
     
    415415                              ("DrvIns=%#x  mine=%#x\n", (pDrvIns)->u32Version, PDM_DRVINS_VERSION), \
    416416                              VERR_VERSION_MISMATCH); \
    417         AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pDrvHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
    418                               ("DrvHlp=%#x  mine=%#x\n", (pDrvIns)->pDrvHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
     417        AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
     418                              ("DrvHlp=%#x  mine=%#x\n", (pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \
    419419                              VERR_VERSION_MISMATCH); \
    420420    } while (0)
     
    433433        PPDMDRVINS pDrvInsTypeCheck = (pDrvIns); NOREF(pDrvInsTypeCheck); \
    434434        if (RT_UNLIKELY(   !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->u32Version, PDM_DRVINS_VERSION) \
    435                         || !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pDrvHlpR3->u32Version, PDM_DRVHLPR3_VERSION)) ) \
     435                        || !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION)) ) \
    436436            return; \
    437437    } while (0)
     
    943943    va_list va;
    944944    va_start(va, pszFormat);
    945     pDrvIns->CTX_SUFF(pDrvHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
     945    pDrvIns->CTX_SUFF(pHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
    946946    va_end(va);
    947947    return rc;
     
    959959DECLINLINE(int) PDMDrvHlpVMSetErrorV(PPDMDRVINS pDrvIns, const int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va)
    960960{
    961     return pDrvIns->CTX_SUFF(pDrvHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
     961    return pDrvIns->CTX_SUFF(pHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);
    962962}
    963963
     
    971971    int rc;
    972972    va_start(va, pszFormat);
    973     rc = pDrvIns->CTX_SUFF(pDrvHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);
     973    rc = pDrvIns->CTX_SUFF(pHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);
    974974    va_end(va);
    975975    return rc;
     
    987987DECLINLINE(int) PDMDrvHlpVMSetRuntimeErrorV(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va)
    988988{
    989     return pDrvIns->CTX_SUFF(pDrvHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);
     989    return pDrvIns->CTX_SUFF(pHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);
    990990}
    991991
     
    997997 */
    998998#ifdef VBOX_STRICT
    999 # define PDMDRV_ASSERT_EMT(pDrvIns)  pDrvIns->CTX_SUFF(pDrvHlp)->pfnAssertEMT(pDrvIns, __FILE__, __LINE__, __FUNCTION__)
     999# define PDMDRV_ASSERT_EMT(pDrvIns)  pDrvIns->CTX_SUFF(pHlp)->pfnAssertEMT(pDrvIns, __FILE__, __LINE__, __FUNCTION__)
    10001000#else
    10011001# define PDMDRV_ASSERT_EMT(pDrvIns)  do { } while (0)
     
    10061006 */
    10071007#ifdef VBOX_STRICT
    1008 # define PDMDRV_ASSERT_OTHER(pDrvIns)  pDrvIns->CTX_SUFF(pDrvHlp)->pfnAssertOther(pDrvIns, __FILE__, __LINE__, __FUNCTION__)
     1008# define PDMDRV_ASSERT_OTHER(pDrvIns)  pDrvIns->CTX_SUFF(pHlp)->pfnAssertOther(pDrvIns, __FILE__, __LINE__, __FUNCTION__)
    10091009#else
    10101010# define PDMDRV_ASSERT_OTHER(pDrvIns)  do { } while (0)
     
    10191019DECLINLINE(int) PDMDrvHlpAttach(PPDMDRVINS pDrvIns, uint32_t fFlags, PPDMIBASE *ppBaseInterface)
    10201020{
    1021     return pDrvIns->pDrvHlpR3->pfnAttach(pDrvIns, fFlags, ppBaseInterface);
     1021    return pDrvIns->pHlpR3->pfnAttach(pDrvIns, fFlags, ppBaseInterface);
    10221022}
    10231023
     
    10301030DECLINLINE(int) PDMDrvHlpNoAttach(PPDMDRVINS pDrvIns)
    10311031{
    1032     return pDrvIns->pDrvHlpR3->pfnAttach(pDrvIns, 0, NULL);
     1032    return pDrvIns->pHlpR3->pfnAttach(pDrvIns, 0, NULL);
    10331033}
    10341034
     
    10381038DECLINLINE(int) PDMDrvHlpDetach(PPDMDRVINS pDrvIns, uint32_t fFlags)
    10391039{
    1040     return pDrvIns->pDrvHlpR3->pfnDetach(pDrvIns, fFlags);
     1040    return pDrvIns->pHlpR3->pfnDetach(pDrvIns, fFlags);
    10411041}
    10421042
     
    10461046DECLINLINE(int) PDMDrvHlpDetachSelf(PPDMDRVINS pDrvIns, uint32_t fFlags)
    10471047{
    1048     return pDrvIns->pDrvHlpR3->pfnDetachSelf(pDrvIns, fFlags);
     1048    return pDrvIns->pHlpR3->pfnDetachSelf(pDrvIns, fFlags);
    10491049}
    10501050
     
    10541054DECLINLINE(int) PDMDrvHlpMountPrepare(PPDMDRVINS pDrvIns, const char *pszFilename, const char *pszCoreDriver)
    10551055{
    1056     return pDrvIns->pDrvHlpR3->pfnMountPrepare(pDrvIns, pszFilename, pszCoreDriver);
     1056    return pDrvIns->pHlpR3->pfnMountPrepare(pDrvIns, pszFilename, pszCoreDriver);
    10571057}
    10581058
     
    10621062DECLINLINE(VMSTATE) PDMDrvHlpVMState(PPDMDRVINS pDrvIns)
    10631063{
    1064     return pDrvIns->CTX_SUFF(pDrvHlp)->pfnVMState(pDrvIns);
     1064    return pDrvIns->CTX_SUFF(pHlp)->pfnVMState(pDrvIns);
    10651065}
    10661066
     
    10701070DECLINLINE(bool) PDMDrvHlpVMTeleportedAndNotFullyResumedYet(PPDMDRVINS pDrvIns)
    10711071{
    1072     return pDrvIns->pDrvHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDrvIns);
     1072    return pDrvIns->pHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDrvIns);
    10731073}
    10741074
     
    10791079                                        PFNPDMQUEUEDRV pfnCallback, const char *pszName, PPDMQUEUE *ppQueue)
    10801080{
    1081     return pDrvIns->pDrvHlpR3->pfnPDMQueueCreate(pDrvIns, cbItem, cItems, cMilliesInterval, pfnCallback, pszName, ppQueue);
     1081    return pDrvIns->pHlpR3->pfnPDMQueueCreate(pDrvIns, cbItem, cItems, cMilliesInterval, pfnCallback, pszName, ppQueue);
    10821082}
    10831083
     
    10871087DECLINLINE(uint64_t) PDMDrvHlpTMGetVirtualFreq(PPDMDRVINS pDrvIns)
    10881088{
    1089     return pDrvIns->pDrvHlpR3->pfnTMGetVirtualFreq(pDrvIns);
     1089    return pDrvIns->pHlpR3->pfnTMGetVirtualFreq(pDrvIns);
    10901090}
    10911091
     
    10951095DECLINLINE(uint64_t) PDMDrvHlpTMGetVirtualTime(PPDMDRVINS pDrvIns)
    10961096{
    1097     return pDrvIns->pDrvHlpR3->pfnTMGetVirtualTime(pDrvIns);
     1097    return pDrvIns->pHlpR3->pfnTMGetVirtualTime(pDrvIns);
    10981098}
    10991099
     
    11031103DECLINLINE(int) PDMDrvHlpTMTimerCreate(PPDMDRVINS pDrvIns, TMCLOCK enmClock, PFNTMTIMERDRV pfnCallback, void *pvUser, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer)
    11041104{
    1105     return pDrvIns->pDrvHlpR3->pfnTMTimerCreate(pDrvIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);
     1105    return pDrvIns->pHlpR3->pfnTMTimerCreate(pDrvIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);
    11061106}
    11071107
     
    11201120                                     PFNSSMDRVSAVEEXEC pfnSaveExec, PFNSSMDRVLOADEXEC pfnLoadExec)
    11211121{
    1122     return pDrvIns->pDrvHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,
     1122    return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,
    11231123                                              NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveVote*/,
    11241124                                              NULL /*pfnSavePrep*/, pfnSaveExec,          NULL /*pfnSaveDone*/,
     
    11341134                                       PFNSSMDRVLOADPREP pfnLoadPrep, PFNSSMDRVLOADEXEC pfnLoadExec, PFNSSMDRVLOADDONE pfnLoadDone)
    11351135{
    1136     return pDrvIns->pDrvHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,
     1136    return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,
    11371137                                              pfnLivePrep, pfnLiveExec, pfnLiveVote,
    11381138                                              pfnSavePrep, pfnSaveExec, pfnSaveDone,
     
    11491149DECLINLINE(int) PDMDrvHlpSSMRegisterLoadDone(PPDMDRVINS pDrvIns, PFNSSMDRVLOADDONE pfnLoadDone)
    11501150{
    1151     return pDrvIns->pDrvHlpR3->pfnSSMRegister(pDrvIns, 0 /*uVersion*/, 0 /*cbGuess*/,
     1151    return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, 0 /*uVersion*/, 0 /*cbGuess*/,
    11521152                                              NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveVote*/,
    11531153                                              NULL /*pfnSavePrep*/, NULL /*pfnSaveExec*/, NULL /*pfnSaveDone*/,
     
    11601160DECLINLINE(void) PDMDrvHlpSTAMRegister(PPDMDRVINS pDrvIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc)
    11611161{
    1162     pDrvIns->pDrvHlpR3->pfnSTAMRegister(pDrvIns, pvSample, enmType, pszName, enmUnit, pszDesc);
     1162    pDrvIns->pHlpR3->pfnSTAMRegister(pDrvIns, pvSample, enmType, pszName, enmUnit, pszDesc);
    11631163}
    11641164
     
    11711171    va_list va;
    11721172    va_start(va, pszName);
    1173     pDrvIns->pDrvHlpR3->pfnSTAMRegisterV(pDrvIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, va);
     1173    pDrvIns->pHlpR3->pfnSTAMRegisterV(pDrvIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, va);
    11741174    va_end(va);
    11751175}
     
    11801180DECLINLINE(int) PDMDrvHlpSTAMDeregister(PPDMDRVINS pDrvIns, void *pvSample)
    11811181{
    1182     return pDrvIns->pDrvHlpR3->pfnSTAMDeregister(pDrvIns, pvSample);
     1182    return pDrvIns->pHlpR3->pfnSTAMDeregister(pDrvIns, pvSample);
    11831183}
    11841184
     
    11881188DECLINLINE(int) PDMDrvHlpSUPCallVMMR0Ex(PPDMDRVINS pDrvIns, unsigned uOperation, void *pvArg, unsigned cbArg)
    11891189{
    1190     return pDrvIns->pDrvHlpR3->pfnSUPCallVMMR0Ex(pDrvIns, uOperation, pvArg, cbArg);
     1190    return pDrvIns->pHlpR3->pfnSUPCallVMMR0Ex(pDrvIns, uOperation, pvArg, cbArg);
    11911191}
    11921192
     
    11961196DECLINLINE(int) PDMDrvHlpUSBRegisterHub(PPDMDRVINS pDrvIns, uint32_t fVersions, uint32_t cPorts, PCPDMUSBHUBREG pUsbHubReg, PPCPDMUSBHUBHLP ppUsbHubHlp)
    11971197{
    1198     return pDrvIns->pDrvHlpR3->pfnUSBRegisterHub(pDrvIns, fVersions, cPorts, pUsbHubReg, ppUsbHubHlp);
     1198    return pDrvIns->pHlpR3->pfnUSBRegisterHub(pDrvIns, fVersions, cPorts, pUsbHubReg, ppUsbHubHlp);
    11991199}
    12001200
     
    12041204DECLINLINE(int) PDMDrvHlpSetAsyncNotification(PPDMDRVINS pDrvIns, PFNPDMDRVASYNCNOTIFY pfnAsyncNotify)
    12051205{
    1206     return pDrvIns->pDrvHlpR3->pfnSetAsyncNotification(pDrvIns, pfnAsyncNotify);
     1206    return pDrvIns->pHlpR3->pfnSetAsyncNotification(pDrvIns, pfnAsyncNotify);
    12071207}
    12081208
     
    12121212DECLINLINE(void) PDMDrvHlpAsyncNotificationCompleted(PPDMDRVINS pDrvIns)
    12131213{
    1214     pDrvIns->pDrvHlpR3->pfnAsyncNotificationCompleted(pDrvIns);
     1214    pDrvIns->pHlpR3->pfnAsyncNotificationCompleted(pDrvIns);
    12151215}
    12161216
     
    12211221                                         PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName)
    12221222{
    1223     return pDrvIns->pDrvHlpR3->pfnPDMThreadCreate(pDrvIns, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName);
     1223    return pDrvIns->pHlpR3->pfnPDMThreadCreate(pDrvIns, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName);
    12241224}
    12251225
     
    12311231                                                          PFNPDMASYNCCOMPLETEDRV pfnCompleted, void *pvTemplateUser, const char *pszDesc)
    12321232{
    1233     return pDrvIns->pDrvHlpR3->pfnPDMAsyncCompletionTemplateCreate(pDrvIns, ppTemplate, pfnCompleted, pvTemplateUser, pszDesc);
     1233    return pDrvIns->pHlpR3->pfnPDMAsyncCompletionTemplateCreate(pDrvIns, ppTemplate, pfnCompleted, pvTemplateUser, pszDesc);
    12341234}
    12351235# endif
  • trunk/src/VBox/VMM/PDMDriver.cpp

    r26166 r26168  
    455455                    //pNew->pDownBase                 = NULL;
    456456                    //pNew->IBase.pfnQueryInterface   = NULL;
    457                     pNew->pDrvHlpR3                 = &g_pdmR3DrvHlp;
     457                    pNew->pHlpR3                 = &g_pdmR3DrvHlp;
    458458                    pNew->pvInstanceDataR3          = &pNew->achInstanceData[0];
    459459                    if (pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_R0)
    460460                    {
    461461                        pNew->pvInstanceDataR0      = MMHyperR3ToR0(pVM, &pNew->achInstanceData[0]);
    462                         rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0DrvHlp", &pNew->pDrvHlpR0);
     462                        rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0DrvHlp", &pNew->pHlpR0);
    463463                        AssertReleaseRCReturn(rc, rc);
    464464
     
    467467                    {
    468468                        pNew->pvInstanceDataR0      = MMHyperR3ToRC(pVM, &pNew->achInstanceData[0]);
    469                         rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDrvHlp", &pNew->pDrvHlpRC);
     469                        rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDrvHlp", &pNew->pHlpRC);
    470470                        AssertReleaseRCReturn(rc, rc);
    471471                    }
  • trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp

    r26161 r26168  
    396396    GEN_CHECK_OFF(PDMDRVINS, u32Version);
    397397    GEN_CHECK_OFF(PDMDRVINS, iInstance);
    398     GEN_CHECK_OFF(PDMDRVINS, pDrvHlpRC);
     398    GEN_CHECK_OFF(PDMDRVINS, pHlpRC);
    399399    GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataRC);
    400     GEN_CHECK_OFF(PDMDRVINS, pDrvHlpR0);
     400    GEN_CHECK_OFF(PDMDRVINS, pHlpR0);
    401401    GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR0);
    402     GEN_CHECK_OFF(PDMDRVINS, pDrvHlpR3);
     402    GEN_CHECK_OFF(PDMDRVINS, pHlpR3);
    403403    GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR3);
    404404    GEN_CHECK_OFF(PDMDRVINS, pReg);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette