VirtualBox

Changeset 33799 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Nov 5, 2010 4:14:07 PM (14 years ago)
Author:
vboxsync
Message:

PDM: Added DevHelps to query virtual time without requiring a timer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/PDMR0Device.cpp

    r32935 r33799  
    249249    LogFlow(("pdmR0DevHlp_GetVMCPU: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
    250250    return VMMGetCpu(pDevIns->Internal.s.pVMR0);
     251}
     252
     253
     254/** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGet} */
     255static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGet(PPDMDEVINS pDevIns)
     256{
     257    PDMDEV_ASSERT_DEVINS(pDevIns);
     258    LogFlow(("pdmR0DevHlp_TMTimeVirtGet: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
     259    return TMVirtualGet(pDevIns->Internal.s.pVMR0);
     260}
     261
     262
     263/** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGetFreq} */
     264static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGetFreq(PPDMDEVINS pDevIns)
     265{
     266    PDMDEV_ASSERT_DEVINS(pDevIns);
     267    LogFlow(("pdmR0DevHlp_TMTimeVirtGetFreq: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
     268    return TMVirtualGetFreq(pDevIns->Internal.s.pVMR0);
     269}
     270
     271
     272/** @interface_method_impl{PDMDEVHLPR0,pfnTMTimeVirtGetNano} */
     273static DECLCALLBACK(uint64_t) pdmR0DevHlp_TMTimeVirtGetNano(PPDMDEVINS pDevIns)
     274{
     275    PDMDEV_ASSERT_DEVINS(pDevIns);
     276    LogFlow(("pdmR0DevHlp_TMTimeVirtGetNano: caller='%p'/%d\n", pDevIns, pDevIns->iInstance));
     277    return TMVirtualToNano(pDevIns->Internal.s.pVMR0, TMVirtualGet(pDevIns->Internal.s.pVMR0));
    251278}
    252279
     
    272299    pdmR0DevHlp_CanEmulateIoBlock,
    273300    pdmR0DevHlp_GetVMCPU,
     301    pdmR0DevHlp_TMTimeVirtGet,
     302    pdmR0DevHlp_TMTimeVirtGetFreq,
     303    pdmR0DevHlp_TMTimeVirtGetNano,
    274304    PDM_DEVHLPR0_VERSION
    275305};
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