Changeset 7768 in vbox for trunk/src/VBox
- Timestamp:
- Apr 7, 2008 1:22:40 PM (17 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMDevice.cpp
r7755 r7768 144 144 static DECLCALLBACK(int) pdmR3DevHlp_PhysReserve(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, const char *pszDesc); 145 145 static DECLCALLBACK(int) pdmR3DevHlp_PhysGCPtr2GCPhys(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys); 146 static DECLCALLBACK(VMSTATE) pdmR3DevHlp_VMState(PPDMDEVINS pDevIns); 146 147 static DECLCALLBACK(bool) pdmR3DevHlp_A20IsEnabled(PPDMDEVINS pDevIns); 147 148 static DECLCALLBACK(void) pdmR3DevHlp_A20Set(PPDMDEVINS pDevIns, bool fEnable); … … 268 269 269 270 /** @def PDMDEV_ASSERT_DEVINS 270 * Asserts the validity of the d riverinstance.271 * Asserts the validity of the device instance. 271 272 */ 272 273 #ifdef VBOX_STRICT 273 # define PDMDEV_ASSERT_DEVINS(pDevIns) do { Assert(pDevIns); Assert(pDevIns->u32Version == PDM_DEVINS_VERSION); Assert(pDevIns->pvInstanceDataR3 == (void *)&pDevIns->achInstanceData[0]); } while (0) 274 # define PDMDEV_ASSERT_DEVINS(pDevIns) \ 275 do { \ 276 AssertPtr(pDevIns); \ 277 Assert(pDevIns->u32Version == PDM_DEVINS_VERSION); \ 278 Assert(pDevIns->pvInstanceDataR3 == (void *)&pDevIns->achInstanceData[0]); \ 279 } while (0) 274 280 #else 275 281 # define PDMDEV_ASSERT_DEVINS(pDevIns) do { } while (0) … … 334 340 pdmR3DevHlp_PDMThreadCreate, 335 341 pdmR3DevHlp_PhysGCPtr2GCPhys, 336 0,342 pdmR3DevHlp_VMState, 337 343 0, 338 344 0, … … 428 434 pdmR3DevHlp_PDMThreadCreate, 429 435 pdmR3DevHlp_PhysGCPtr2GCPhys, 430 0,436 pdmR3DevHlp_VMState, 431 437 0, 432 438 0, … … 3285 3291 } 3286 3292 3293 3287 3294 /** @copydoc PDMDEVHLP::pfnPhysGCPtr2GCPhys */ 3288 3295 static DECLCALLBACK(int) pdmR3DevHlp_PhysGCPtr2GCPhys(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys) … … 3302 3309 3303 3310 return rc; 3311 } 3312 3313 3314 /** @copydoc PDMDEVHLP::pfnVMState */ 3315 static DECLCALLBACK(VMSTATE) pdmR3DevHlp_VMState(PPDMDEVINS pDevIns) 3316 { 3317 PDMDEV_ASSERT_DEVINS(pDevIns); 3318 3319 VMSTATE enmVMState = VMR3GetState(pDevIns->Internal.s.pVMHC); 3320 3321 LogFlow(("pdmR3DevHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, 3322 enmVMState, VMR3GetStateName(enmVMState))); 3323 return enmVMState; 3304 3324 } 3305 3325 -
trunk/src/VBox/VMM/PDMDriver.cpp
r6796 r7768 93 93 static DECLCALLBACK(int) pdmR3DrvHlp_PDMThreadCreate(PPDMDRVINS pDrvIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDRV pfnThread, 94 94 PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName); 95 static DECLCALLBACK(VMSTATE) pdmR3DrvHlp_VMState(PPDMDRVINS pDrvIns); 96 95 97 96 98 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION … … 103 105 */ 104 106 #ifdef VBOX_STRICT 105 # define PDMDRV_ASSERT_DRVINS(pDrvIns) do { Assert(pDrvIns); Assert(pDrvIns->u32Version == PDM_DRVINS_VERSION); Assert(pDrvIns->pvInstanceData == (void *)&pDrvIns->achInstanceData[0]); } while (0) 107 # define PDMDRV_ASSERT_DRVINS(pDrvIns) \ 108 do { \ 109 AssertPtr(pDrvIns); \ 110 Assert(pDrvIns->u32Version == PDM_DRVINS_VERSION); \ 111 Assert(pDrvIns->pvInstanceData == (void *)&pDrvIns->achInstanceData[0]); \ 112 } while (0) 106 113 #else 107 114 # define PDMDRV_ASSERT_DRVINS(pDrvIns) do { } while (0) … … 145 152 pdmR3DrvHlp_USBRegisterHub, 146 153 pdmR3DrvHlp_PDMThreadCreate, 154 pdmR3DrvHlp_VMState, 147 155 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 148 156 pdmR3DrvHlp_PDMAsyncCompletionTemplateCreate, … … 1074 1082 } 1075 1083 1084 1085 /** @copydoc PDMDEVHLP::pfnVMState */ 1086 static DECLCALLBACK(VMSTATE) pdmR3DrvHlp_VMState(PPDMDRVINS pDrvIns) 1087 { 1088 PDMDRV_ASSERT_DRVINS(pDrvIns); 1089 1090 VMSTATE enmVMState = VMR3GetState(pDrvIns->Internal.s.pVM); 1091 1092 LogFlow(("pdmR3DrvHlp_VMState: caller='%s'/%d: returns %d (%s)\n", pDrvIns->pDrvReg->szDriverName, pDrvIns->iInstance, 1093 enmVMState, VMR3GetStateName(enmVMState))); 1094 return enmVMState; 1095 } 1096 1097 1076 1098 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 1099 /** @copydoc PDMDRVHLP::pfnPDMAsyncCompletionTemplateCreate */ 1077 1100 static DECLCALLBACK(int) pdmR3DrvHlp_PDMAsyncCompletionTemplateCreate(PPDMDRVINS pDrvIns, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, 1078 1101 PFNPDMASYNCCOMPLETEDRV pfnCompleted, const char *pszDesc)
Note:
See TracChangeset
for help on using the changeset viewer.