Changeset 7768 in vbox
- Timestamp:
- Apr 7, 2008 1:22:40 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmdev.h
r7755 r7768 2228 2228 DECLR3CALLBACKMEMBER(int, pfnPhysGCPtr2GCPhys, (PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTGCPHYS pGCPhys)); 2229 2229 2230 /** 2231 * Gets the VM state. 2232 * 2233 * @returns VM state. 2234 * @param pDevIns The device instance. 2235 * @thread Any thread (just keep in mind that it's volatile info). 2236 */ 2237 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDEVINS pDevIns)); 2238 2230 2239 /** Space reserved for future members. 2231 2240 * @{ */ 2232 DECLR3CALLBACKMEMBER(void, pfnReserved3,(void));2233 2241 DECLR3CALLBACKMEMBER(void, pfnReserved4,(void)); 2234 2242 DECLR3CALLBACKMEMBER(void, pfnReserved5,(void)); … … 2671 2679 2672 2680 /** Current PDMDEVHLP version number. */ 2673 #define PDM_DEVHLP_VERSION 0xf205000 12681 #define PDM_DEVHLP_VERSION 0xf2050002 2674 2682 2675 2683 … … 3354 3362 3355 3363 /** 3364 * @copydoc PDMDEVHLP::pfnVMState 3365 */ 3366 DECLINLINE(VMSTATE) PDMDevHlpVMState(PPDMDEVINS pDevIns) 3367 { 3368 return pDevIns->pDevHlp->pfnVMState(pDevIns); 3369 } 3370 3371 /** 3356 3372 * @copydoc PDMDEVHLP::pfnA20Set 3357 3373 */ -
trunk/include/VBox/pdmdrv.h
r6221 r7768 655 655 DECLR3CALLBACKMEMBER(int, pfnPDMThreadCreate,(PPDMDRVINS pDrvIns, PPPDMTHREAD ppThread, void *pvUser, PFNPDMTHREADDRV pfnThread, 656 656 PFNPDMTHREADWAKEUPDRV pfnWakeup, size_t cbStack, RTTHREADTYPE enmType, const char *pszName)); 657 658 /** 659 * Gets the VM state. 660 * 661 * @returns VM state. 662 * @param pDrvIns The driver instance. 663 * @thread Any thread (just keep in mind that it's volatile info). 664 */ 665 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMDRVINS pDrvIns)); 666 657 667 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 658 668 /** … … 667 677 * @param pszDesc Description. 668 678 */ 669 DECLR3CALLBACKMEMBER(int, pfnPDMAsyncCompletionTemplateCreate,(PPDMDRVINS pDrvIns, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, 679 DECLR3CALLBACKMEMBER(int, pfnPDMAsyncCompletionTemplateCreate,(PPDMDRVINS pDrvIns, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, 670 680 PFNPDMASYNCCOMPLETEDRV pfnCompleted, const char *pszDesc)); 671 681 #endif … … 680 690 681 691 /** Current DRVHLP version number. */ 682 #define PDM_DRVHLP_VERSION 0x9002000 0692 #define PDM_DRVHLP_VERSION 0x90020001 683 693 684 694 … … 828 838 } 829 839 840 /** 841 * @copydoc PDMDRVHLP::pfnVMState 842 */ 843 DECLINLINE(VMSTATE) PDMDrvHlpVMState(PPDMDRVINS pDrvIns) 844 { 845 return pDrvIns->pDrvHlp->pfnVMState(pDrvIns); 846 } 847 830 848 #ifdef VBOX_WITH_PDM_ASYNC_COMPLETION 831 849 /** 832 850 * @copydoc PDMDRVHLP::pfnPDMAsyncCompletionTemplateCreate 833 851 */ 834 DECLINLINE(int) PDMDrvHlpPDMAsyncCompletionTemplateCreate(PPDMDRVINS pDrvIns, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, 852 DECLINLINE(int) PDMDrvHlpPDMAsyncCompletionTemplateCreate(PPDMDRVINS pDrvIns, PPPDMASYNCCOMPLETIONTEMPLATE ppTemplate, 835 853 PFNPDMASYNCCOMPLETEDRV pfnCompleted, const char *pszDesc) 836 854 { -
trunk/include/VBox/pdmusb.h
r5999 r7768 558 558 DECLR3CALLBACKMEMBER(int, pfnVMSetRuntimeErrorV,(PPDMUSBINS pUsbIns, bool fFatal, const char *pszErrorID, const char *pszFormat, va_list va)); 559 559 560 /** 561 * Gets the VM state. 562 * 563 * @returns VM state. 564 * @param pUsbIns The USB device instance. 565 * @thread Any thread (just keep in mind that it's volatile info). 566 */ 567 DECLR3CALLBACKMEMBER(VMSTATE, pfnVMState, (PPDMUSBINS pUsbIns)); 568 560 569 /** Just a safety precaution. */ 561 570 uint32_t u32TheEnd; … … 567 576 568 577 /** Current USBHLP version number. */ 569 #define PDM_USBHLP_VERSION 0xec02000 0578 #define PDM_USBHLP_VERSION 0xec020001 570 579 571 580 #endif /* IN_RING3 */ … … 684 693 } 685 694 686 687 /* inline wrappers */ 688 689 #endif 695 /** 696 * @copydoc PDMUSBHLP::pfnVMState 697 */ 698 DECLINLINE(VMSTATE) PDMUsbHlpVMState(PPDMUSBINS pUsbIns) 699 { 700 return pUsbIns->pUsbHlp->pfnVMState(pUsbIns); 701 } 702 703 #endif /* IN_RING3 */ 690 704 691 705 -
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.