Changeset 2464 in vbox
- Timestamp:
- May 3, 2007 3:09:01 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdm.h
r2292 r2464 4941 4941 DECLR3CALLBACKMEMBER(int, pfnCritSectInit,(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, const char *pszName)); 4942 4942 4943 /** 4944 * Get the real world UCT time adjusted for VM lag. 4945 * 4946 * @returns pTime. 4947 * @param pDevIns Device instance. 4948 * @param pTime Where to store the time. 4949 */ 4950 DECLR3CALLBACKMEMBER(PRTTIMESPEC, pfnUCTNow,(PPDMDEVINS pDevIns, PRTTIMESPEC pTime)); 4951 4952 /** Space reserved for future members. 4953 * @{ */ 4954 DECLR3CALLBACKMEMBER(void, pfnReserved1,(void)); 4955 DECLR3CALLBACKMEMBER(void, pfnReserved2,(void)); 4956 DECLR3CALLBACKMEMBER(void, pfnReserved3,(void)); 4957 DECLR3CALLBACKMEMBER(void, pfnReserved4,(void)); 4958 DECLR3CALLBACKMEMBER(void, pfnReserved5,(void)); 4959 DECLR3CALLBACKMEMBER(void, pfnReserved6,(void)); 4960 DECLR3CALLBACKMEMBER(void, pfnReserved7,(void)); 4961 DECLR3CALLBACKMEMBER(void, pfnReserved8,(void)); 4962 DECLR3CALLBACKMEMBER(void, pfnReserved9,(void)); 4963 DECLR3CALLBACKMEMBER(void, pfnReserved10,(void)); 4964 /** @} */ 4965 4943 4966 4944 4967 /** API available to trusted devices only. … … 5263 5286 5264 5287 /** Current PDMDEVHLP version number. */ 5265 #define PDM_DEVHLP_VERSION 0xf20 100005288 #define PDM_DEVHLP_VERSION 0xf2020000 5266 5289 5267 5290 … … 5808 5831 5809 5832 /** 5833 * @copydoc PDMDEVHLP::pfnUCTNow 5834 */ 5835 DECLINLINE(PRTTIMESPEC) PDMDevHlpUCTNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime) 5836 { 5837 return pDevIns->pDevHlp->pfnUCTNow(pDevIns, pTime); 5838 } 5839 5840 /** 5810 5841 * @copydoc PDMDEVHLP::pfnGetVM 5811 5842 */ -
trunk/include/VBox/tm.h
r2248 r2464 25 25 #include <VBox/cdefs.h> 26 26 #include <VBox/types.h> 27 #ifdef IN_RING3 28 # include <iprt/time.h> 29 #endif 27 30 28 31 __BEGIN_DECLS … … 723 726 TMR3DECL(void) TMR3TimerQueuesDo(PVM pVM); 724 727 728 /** 729 * Get the real world UCT time adjusted for VM lag. 730 * 731 * @returns pTime. 732 * @param pVM The VM instance. 733 * @param pTime Where to store the time. 734 */ 735 TMR3DECL(PRTTIMESPEC) TMR3UCTNow(PVM pVM, PRTTIMESPEC pTime); 725 736 726 737 /** @} */ -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r2053 r2464 364 364 else 365 365 { 366 pData->hostTime = RTTimeSpecGetMilli( RTTimeNow(&now));366 pData->hostTime = RTTimeSpecGetMilli(PDMDevHlpUCTNow(pDevIns, &now)); 367 367 *pu32 = (uint32_t)(pData->hostTime >> 32); 368 368 } … … 630 630 VMMDevReqHostTime *hostTimeReq = (VMMDevReqHostTime*)requestHeader; 631 631 RTTIMESPEC now; 632 hostTimeReq->time = RTTimeSpecGetMilli( RTTimeNow(&now));632 hostTimeReq->time = RTTimeSpecGetMilli(PDMDevHlpUCTNow(pDevIns, &now)); 633 633 requestHeader->rc = VINF_SUCCESS; 634 634 } -
trunk/src/VBox/VMM/PDMDevice.cpp
r2452 r2464 126 126 static DECLCALLBACK(void) pdmR3DevHlp_STAMRegisterV(PPDMDEVINS pDevIns, void *pvSample, STAMTYPE enmType, STAMVISIBILITY enmVisibility, STAMUNIT enmUnit, const char *pszDesc, const char *pszName, va_list args); 127 127 static DECLCALLBACK(int) pdmR3DevHlp_CritSectInit(PPDMDEVINS pDevIns, PPDMCRITSECT pCritSect, const char *pszName); 128 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_UCTNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime); 128 129 129 130 static DECLCALLBACK(PVM) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns); … … 307 308 pdmR3DevHlp_PDMQueueCreate, 308 309 pdmR3DevHlp_CritSectInit, 310 pdmR3DevHlp_UCTNow, 311 0, 312 0, 313 0, 314 0, 315 0, 316 0, 317 0, 318 0, 319 0, 320 0, 309 321 pdmR3DevHlp_GetVM, 310 322 pdmR3DevHlp_PCIBusRegister, … … 380 392 pdmR3DevHlp_PDMQueueCreate, 381 393 pdmR3DevHlp_CritSectInit, 394 pdmR3DevHlp_UCTNow, 395 0, 396 0, 397 0, 398 0, 399 0, 400 0, 401 0, 402 0, 403 0, 404 0, 382 405 pdmR3DevHlp_Untrusted_GetVM, 383 406 pdmR3DevHlp_Untrusted_PCIBusRegister, … … 2271 2294 2272 2295 2296 /** @copydoc PDMDEVHLP::pfnUCTNow */ 2297 static DECLCALLBACK(PRTTIMESPEC) pdmR3DevHlp_UCTNow(PPDMDEVINS pDevIns, PRTTIMESPEC pTime) 2298 { 2299 PDMDEV_ASSERT_DEVINS(pDevIns); 2300 LogFlow(("pdmR3DevHlp_UCTNow: caller='%s'/%d: pTime=%p\n", 2301 pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, pTime)); 2302 2303 pTime = TMR3UCTNow(pDevIns->Internal.s.pVMHC, pTime); 2304 2305 LogFlow(("pdmR3DevHlp_UCTNow: caller='%s'/%d: returns %RU64\n", pDevIns->pDevReg->szDeviceName, pDevIns->iInstance, RTTimeSpecGetNano(pTime))); 2306 return pTime; 2307 } 2308 2309 2273 2310 /** @copydoc PDMDEVHLP::pfnGetVM */ 2274 2311 static DECLCALLBACK(PVM) pdmR3DevHlp_GetVM(PPDMDEVINS pDevIns) -
trunk/src/VBox/VMM/TM.cpp
r2283 r2464 1615 1615 1616 1616 /** 1617 * Get the real world UCT time adjusted for VM lag. 1618 * 1619 * @returns pTime. 1620 * @param pVM The VM instance. 1621 * @param pTime Where to store the time. 1622 */ 1623 TMR3DECL(PRTTIMESPEC) TMR3UCTNow(PVM pVM, PRTTIMESPEC pTime) 1624 { 1625 RTTimeNow(pTime); 1626 RTTimeSpecSubNano(pTime, pVM->tm.s.offVirtualSync - pVM->tm.s.offVirtualSyncGivenUp); 1627 return pTime; 1628 } 1629 1630 1631 /** 1617 1632 * Display all timers. 1618 1633 *
Note:
See TracChangeset
for help on using the changeset viewer.