- Timestamp:
- Feb 2, 2010 8:00:05 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdrv.h
r26166 r26168 350 350 351 351 /** Pointer the PDM Driver API. */ 352 RCPTRTYPE(PCPDMDRVHLPRC) p DrvHlpRC;352 RCPTRTYPE(PCPDMDRVHLPRC) pHlpRC; 353 353 /** Pointer to driver instance data. */ 354 354 RCPTRTYPE(void *) pvInstanceDataRC; 355 355 356 356 /** Pointer the PDM Driver API. */ 357 R0PTRTYPE(PCPDMDRVHLPR0) p DrvHlpR0;357 R0PTRTYPE(PCPDMDRVHLPR0) pHlpR0; 358 358 /** Pointer to driver instance data. */ 359 359 R0PTRTYPE(void *) pvInstanceDataR0; 360 360 361 361 /** Pointer the PDM Driver API. */ 362 R3PTRTYPE(PCPDMDRVHLPR3) p DrvHlpR3;362 R3PTRTYPE(PCPDMDRVHLPR3) pHlpR3; 363 363 /** Pointer to driver instance data. */ 364 364 R3PTRTYPE(void *) pvInstanceDataR3; … … 415 415 ("DrvIns=%#x mine=%#x\n", (pDrvIns)->u32Version, PDM_DRVINS_VERSION), \ 416 416 VERR_VERSION_MISMATCH); \ 417 AssertLogRelMsgReturn(PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->p DrvHlpR3->u32Version, PDM_DRVHLPR3_VERSION), \418 ("DrvHlp=%#x mine=%#x\n", (pDrvIns)->p DrvHlpR3->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), \ 419 419 VERR_VERSION_MISMATCH); \ 420 420 } while (0) … … 433 433 PPDMDRVINS pDrvInsTypeCheck = (pDrvIns); NOREF(pDrvInsTypeCheck); \ 434 434 if (RT_UNLIKELY( !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->u32Version, PDM_DRVINS_VERSION) \ 435 || !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->p DrvHlpR3->u32Version, PDM_DRVHLPR3_VERSION)) ) \435 || !PDM_VERSION_ARE_COMPATIBLE((pDrvIns)->pHlpR3->u32Version, PDM_DRVHLPR3_VERSION)) ) \ 436 436 return; \ 437 437 } while (0) … … 943 943 va_list va; 944 944 va_start(va, pszFormat); 945 pDrvIns->CTX_SUFF(p DrvHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);945 pDrvIns->CTX_SUFF(pHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va); 946 946 va_end(va); 947 947 return rc; … … 959 959 DECLINLINE(int) PDMDrvHlpVMSetErrorV(PPDMDRVINS pDrvIns, const int rc, RT_SRC_POS_DECL, const char *pszFormat, va_list va) 960 960 { 961 return pDrvIns->CTX_SUFF(p DrvHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va);961 return pDrvIns->CTX_SUFF(pHlp)->pfnVMSetErrorV(pDrvIns, rc, RT_SRC_POS_ARGS, pszFormat, va); 962 962 } 963 963 … … 971 971 int rc; 972 972 va_start(va, pszFormat); 973 rc = pDrvIns->CTX_SUFF(p DrvHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);973 rc = pDrvIns->CTX_SUFF(pHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va); 974 974 va_end(va); 975 975 return rc; … … 987 987 DECLINLINE(int) PDMDrvHlpVMSetRuntimeErrorV(PPDMDRVINS pDrvIns, uint32_t fFlags, const char *pszErrorId, const char *pszFormat, va_list va) 988 988 { 989 return pDrvIns->CTX_SUFF(p DrvHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va);989 return pDrvIns->CTX_SUFF(pHlp)->pfnVMSetRuntimeErrorV(pDrvIns, fFlags, pszErrorId, pszFormat, va); 990 990 } 991 991 … … 997 997 */ 998 998 #ifdef VBOX_STRICT 999 # define PDMDRV_ASSERT_EMT(pDrvIns) pDrvIns->CTX_SUFF(p DrvHlp)->pfnAssertEMT(pDrvIns, __FILE__, __LINE__, __FUNCTION__)999 # define PDMDRV_ASSERT_EMT(pDrvIns) pDrvIns->CTX_SUFF(pHlp)->pfnAssertEMT(pDrvIns, __FILE__, __LINE__, __FUNCTION__) 1000 1000 #else 1001 1001 # define PDMDRV_ASSERT_EMT(pDrvIns) do { } while (0) … … 1006 1006 */ 1007 1007 #ifdef VBOX_STRICT 1008 # define PDMDRV_ASSERT_OTHER(pDrvIns) pDrvIns->CTX_SUFF(p DrvHlp)->pfnAssertOther(pDrvIns, __FILE__, __LINE__, __FUNCTION__)1008 # define PDMDRV_ASSERT_OTHER(pDrvIns) pDrvIns->CTX_SUFF(pHlp)->pfnAssertOther(pDrvIns, __FILE__, __LINE__, __FUNCTION__) 1009 1009 #else 1010 1010 # define PDMDRV_ASSERT_OTHER(pDrvIns) do { } while (0) … … 1019 1019 DECLINLINE(int) PDMDrvHlpAttach(PPDMDRVINS pDrvIns, uint32_t fFlags, PPDMIBASE *ppBaseInterface) 1020 1020 { 1021 return pDrvIns->p DrvHlpR3->pfnAttach(pDrvIns, fFlags, ppBaseInterface);1021 return pDrvIns->pHlpR3->pfnAttach(pDrvIns, fFlags, ppBaseInterface); 1022 1022 } 1023 1023 … … 1030 1030 DECLINLINE(int) PDMDrvHlpNoAttach(PPDMDRVINS pDrvIns) 1031 1031 { 1032 return pDrvIns->p DrvHlpR3->pfnAttach(pDrvIns, 0, NULL);1032 return pDrvIns->pHlpR3->pfnAttach(pDrvIns, 0, NULL); 1033 1033 } 1034 1034 … … 1038 1038 DECLINLINE(int) PDMDrvHlpDetach(PPDMDRVINS pDrvIns, uint32_t fFlags) 1039 1039 { 1040 return pDrvIns->p DrvHlpR3->pfnDetach(pDrvIns, fFlags);1040 return pDrvIns->pHlpR3->pfnDetach(pDrvIns, fFlags); 1041 1041 } 1042 1042 … … 1046 1046 DECLINLINE(int) PDMDrvHlpDetachSelf(PPDMDRVINS pDrvIns, uint32_t fFlags) 1047 1047 { 1048 return pDrvIns->p DrvHlpR3->pfnDetachSelf(pDrvIns, fFlags);1048 return pDrvIns->pHlpR3->pfnDetachSelf(pDrvIns, fFlags); 1049 1049 } 1050 1050 … … 1054 1054 DECLINLINE(int) PDMDrvHlpMountPrepare(PPDMDRVINS pDrvIns, const char *pszFilename, const char *pszCoreDriver) 1055 1055 { 1056 return pDrvIns->p DrvHlpR3->pfnMountPrepare(pDrvIns, pszFilename, pszCoreDriver);1056 return pDrvIns->pHlpR3->pfnMountPrepare(pDrvIns, pszFilename, pszCoreDriver); 1057 1057 } 1058 1058 … … 1062 1062 DECLINLINE(VMSTATE) PDMDrvHlpVMState(PPDMDRVINS pDrvIns) 1063 1063 { 1064 return pDrvIns->CTX_SUFF(p DrvHlp)->pfnVMState(pDrvIns);1064 return pDrvIns->CTX_SUFF(pHlp)->pfnVMState(pDrvIns); 1065 1065 } 1066 1066 … … 1070 1070 DECLINLINE(bool) PDMDrvHlpVMTeleportedAndNotFullyResumedYet(PPDMDRVINS pDrvIns) 1071 1071 { 1072 return pDrvIns->p DrvHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDrvIns);1072 return pDrvIns->pHlpR3->pfnVMTeleportedAndNotFullyResumedYet(pDrvIns); 1073 1073 } 1074 1074 … … 1079 1079 PFNPDMQUEUEDRV pfnCallback, const char *pszName, PPDMQUEUE *ppQueue) 1080 1080 { 1081 return pDrvIns->p DrvHlpR3->pfnPDMQueueCreate(pDrvIns, cbItem, cItems, cMilliesInterval, pfnCallback, pszName, ppQueue);1081 return pDrvIns->pHlpR3->pfnPDMQueueCreate(pDrvIns, cbItem, cItems, cMilliesInterval, pfnCallback, pszName, ppQueue); 1082 1082 } 1083 1083 … … 1087 1087 DECLINLINE(uint64_t) PDMDrvHlpTMGetVirtualFreq(PPDMDRVINS pDrvIns) 1088 1088 { 1089 return pDrvIns->p DrvHlpR3->pfnTMGetVirtualFreq(pDrvIns);1089 return pDrvIns->pHlpR3->pfnTMGetVirtualFreq(pDrvIns); 1090 1090 } 1091 1091 … … 1095 1095 DECLINLINE(uint64_t) PDMDrvHlpTMGetVirtualTime(PPDMDRVINS pDrvIns) 1096 1096 { 1097 return pDrvIns->p DrvHlpR3->pfnTMGetVirtualTime(pDrvIns);1097 return pDrvIns->pHlpR3->pfnTMGetVirtualTime(pDrvIns); 1098 1098 } 1099 1099 … … 1103 1103 DECLINLINE(int) PDMDrvHlpTMTimerCreate(PPDMDRVINS pDrvIns, TMCLOCK enmClock, PFNTMTIMERDRV pfnCallback, void *pvUser, uint32_t fFlags, const char *pszDesc, PPTMTIMERR3 ppTimer) 1104 1104 { 1105 return pDrvIns->p DrvHlpR3->pfnTMTimerCreate(pDrvIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer);1105 return pDrvIns->pHlpR3->pfnTMTimerCreate(pDrvIns, enmClock, pfnCallback, pvUser, fFlags, pszDesc, ppTimer); 1106 1106 } 1107 1107 … … 1120 1120 PFNSSMDRVSAVEEXEC pfnSaveExec, PFNSSMDRVLOADEXEC pfnLoadExec) 1121 1121 { 1122 return pDrvIns->p DrvHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,1122 return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess, 1123 1123 NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveVote*/, 1124 1124 NULL /*pfnSavePrep*/, pfnSaveExec, NULL /*pfnSaveDone*/, … … 1134 1134 PFNSSMDRVLOADPREP pfnLoadPrep, PFNSSMDRVLOADEXEC pfnLoadExec, PFNSSMDRVLOADDONE pfnLoadDone) 1135 1135 { 1136 return pDrvIns->p DrvHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess,1136 return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, uVersion, cbGuess, 1137 1137 pfnLivePrep, pfnLiveExec, pfnLiveVote, 1138 1138 pfnSavePrep, pfnSaveExec, pfnSaveDone, … … 1149 1149 DECLINLINE(int) PDMDrvHlpSSMRegisterLoadDone(PPDMDRVINS pDrvIns, PFNSSMDRVLOADDONE pfnLoadDone) 1150 1150 { 1151 return pDrvIns->p DrvHlpR3->pfnSSMRegister(pDrvIns, 0 /*uVersion*/, 0 /*cbGuess*/,1151 return pDrvIns->pHlpR3->pfnSSMRegister(pDrvIns, 0 /*uVersion*/, 0 /*cbGuess*/, 1152 1152 NULL /*pfnLivePrep*/, NULL /*pfnLiveExec*/, NULL /*pfnLiveVote*/, 1153 1153 NULL /*pfnSavePrep*/, NULL /*pfnSaveExec*/, NULL /*pfnSaveDone*/, … … 1160 1160 DECLINLINE(void) PDMDrvHlpSTAMRegister(PPDMDRVINS pDrvIns, void *pvSample, STAMTYPE enmType, const char *pszName, STAMUNIT enmUnit, const char *pszDesc) 1161 1161 { 1162 pDrvIns->p DrvHlpR3->pfnSTAMRegister(pDrvIns, pvSample, enmType, pszName, enmUnit, pszDesc);1162 pDrvIns->pHlpR3->pfnSTAMRegister(pDrvIns, pvSample, enmType, pszName, enmUnit, pszDesc); 1163 1163 } 1164 1164 … … 1171 1171 va_list va; 1172 1172 va_start(va, pszName); 1173 pDrvIns->p DrvHlpR3->pfnSTAMRegisterV(pDrvIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, va);1173 pDrvIns->pHlpR3->pfnSTAMRegisterV(pDrvIns, pvSample, enmType, enmVisibility, enmUnit, pszDesc, pszName, va); 1174 1174 va_end(va); 1175 1175 } … … 1180 1180 DECLINLINE(int) PDMDrvHlpSTAMDeregister(PPDMDRVINS pDrvIns, void *pvSample) 1181 1181 { 1182 return pDrvIns->p DrvHlpR3->pfnSTAMDeregister(pDrvIns, pvSample);1182 return pDrvIns->pHlpR3->pfnSTAMDeregister(pDrvIns, pvSample); 1183 1183 } 1184 1184 … … 1188 1188 DECLINLINE(int) PDMDrvHlpSUPCallVMMR0Ex(PPDMDRVINS pDrvIns, unsigned uOperation, void *pvArg, unsigned cbArg) 1189 1189 { 1190 return pDrvIns->p DrvHlpR3->pfnSUPCallVMMR0Ex(pDrvIns, uOperation, pvArg, cbArg);1190 return pDrvIns->pHlpR3->pfnSUPCallVMMR0Ex(pDrvIns, uOperation, pvArg, cbArg); 1191 1191 } 1192 1192 … … 1196 1196 DECLINLINE(int) PDMDrvHlpUSBRegisterHub(PPDMDRVINS pDrvIns, uint32_t fVersions, uint32_t cPorts, PCPDMUSBHUBREG pUsbHubReg, PPCPDMUSBHUBHLP ppUsbHubHlp) 1197 1197 { 1198 return pDrvIns->p DrvHlpR3->pfnUSBRegisterHub(pDrvIns, fVersions, cPorts, pUsbHubReg, ppUsbHubHlp);1198 return pDrvIns->pHlpR3->pfnUSBRegisterHub(pDrvIns, fVersions, cPorts, pUsbHubReg, ppUsbHubHlp); 1199 1199 } 1200 1200 … … 1204 1204 DECLINLINE(int) PDMDrvHlpSetAsyncNotification(PPDMDRVINS pDrvIns, PFNPDMDRVASYNCNOTIFY pfnAsyncNotify) 1205 1205 { 1206 return pDrvIns->p DrvHlpR3->pfnSetAsyncNotification(pDrvIns, pfnAsyncNotify);1206 return pDrvIns->pHlpR3->pfnSetAsyncNotification(pDrvIns, pfnAsyncNotify); 1207 1207 } 1208 1208 … … 1212 1212 DECLINLINE(void) PDMDrvHlpAsyncNotificationCompleted(PPDMDRVINS pDrvIns) 1213 1213 { 1214 pDrvIns->p DrvHlpR3->pfnAsyncNotificationCompleted(pDrvIns);1214 pDrvIns->pHlpR3->pfnAsyncNotificationCompleted(pDrvIns); 1215 1215 } 1216 1216 … … 1221 1221 PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName) 1222 1222 { 1223 return pDrvIns->p DrvHlpR3->pfnPDMThreadCreate(pDrvIns, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName);1223 return pDrvIns->pHlpR3->pfnPDMThreadCreate(pDrvIns, ppThread, pvUser, pfnThread, pfnWakeup, cbStack, enmType, pszName); 1224 1224 } 1225 1225 … … 1231 1231 PFNPDMASYNCCOMPLETEDRV pfnCompleted, void *pvTemplateUser, const char *pszDesc) 1232 1232 { 1233 return pDrvIns->p DrvHlpR3->pfnPDMAsyncCompletionTemplateCreate(pDrvIns, ppTemplate, pfnCompleted, pvTemplateUser, pszDesc);1233 return pDrvIns->pHlpR3->pfnPDMAsyncCompletionTemplateCreate(pDrvIns, ppTemplate, pfnCompleted, pvTemplateUser, pszDesc); 1234 1234 } 1235 1235 # endif -
trunk/src/VBox/VMM/PDMDriver.cpp
r26166 r26168 455 455 //pNew->pDownBase = NULL; 456 456 //pNew->IBase.pfnQueryInterface = NULL; 457 pNew->p DrvHlpR3 = &g_pdmR3DrvHlp;457 pNew->pHlpR3 = &g_pdmR3DrvHlp; 458 458 pNew->pvInstanceDataR3 = &pNew->achInstanceData[0]; 459 459 if (pDrv->pReg->fFlags & PDM_DRVREG_FLAGS_R0) 460 460 { 461 461 pNew->pvInstanceDataR0 = MMHyperR3ToR0(pVM, &pNew->achInstanceData[0]); 462 rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0DrvHlp", &pNew->p DrvHlpR0);462 rc = PDMR3LdrGetSymbolR0(pVM, NULL, "g_pdmR0DrvHlp", &pNew->pHlpR0); 463 463 AssertReleaseRCReturn(rc, rc); 464 464 … … 467 467 { 468 468 pNew->pvInstanceDataR0 = MMHyperR3ToRC(pVM, &pNew->achInstanceData[0]); 469 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDrvHlp", &pNew->p DrvHlpRC);469 rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_pdmRCDrvHlp", &pNew->pHlpRC); 470 470 AssertReleaseRCReturn(rc, rc); 471 471 } -
trunk/src/VBox/VMM/testcase/tstVMStructRC.cpp
r26161 r26168 396 396 GEN_CHECK_OFF(PDMDRVINS, u32Version); 397 397 GEN_CHECK_OFF(PDMDRVINS, iInstance); 398 GEN_CHECK_OFF(PDMDRVINS, p DrvHlpRC);398 GEN_CHECK_OFF(PDMDRVINS, pHlpRC); 399 399 GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataRC); 400 GEN_CHECK_OFF(PDMDRVINS, p DrvHlpR0);400 GEN_CHECK_OFF(PDMDRVINS, pHlpR0); 401 401 GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR0); 402 GEN_CHECK_OFF(PDMDRVINS, p DrvHlpR3);402 GEN_CHECK_OFF(PDMDRVINS, pHlpR3); 403 403 GEN_CHECK_OFF(PDMDRVINS, pvInstanceDataR3); 404 404 GEN_CHECK_OFF(PDMDRVINS, pReg);
Note:
See TracChangeset
for help on using the changeset viewer.