VirtualBox

Changeset 53459 in vbox for trunk/src


Ignore:
Timestamp:
Dec 5, 2014 1:07:30 PM (10 years ago)
Author:
vboxsync
Message:

SUPDrv.c: Removed RTTimeSystemNanoTS() CPU burning loop from supdrvGipSyncTimer and marked the one in supdrvRefineTscTimer as a portability issue. Also added a todo about moving global data variables.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrv.c

    r53458 r53459  
    187187DECLEXPORT(PSUPGLOBALINFOPAGE) g_pSUPGlobalInfoPage = NULL;
    188188
     189/** @name r=bird: Stuff that should be SUPDRVDEVEXT members.
     190 * @todo Move this ASAP.  */
    189191/**
    190192 * The TSC delta synchronization struct. rounded to cache line size.
     
    218220 *  CPUs. */
    219221static bool                 g_fOsTscDeltasInSync;
     222/** @}  */
    220223
    221224/**
     
    60616064        /*
    60626065         * Synchronize with the host OS clock tick before reading the TSC.
    6063          * Especially important on Windows where the granularity is terrible.
     6066         * Especially important on older Windows version where the granularity is terrible.
    60646067         */
    60656068        u64NanoTsBefore = RTTimeSystemNanoTS();
     
    61706173    Assert(pGip->u32Mode == SUPGIPMODE_INVARIANT_TSC);
    61716174
     6175#if !defined(RT_OS_OS2) /* PORTME: Disable if timers are called from clock interrupt handler or with interrupts disabled. */
    61726176    u64NanoTS = RTTimeSystemNanoTS();
    61736177    while (RTTimeSystemNanoTS() == u64NanoTS)
    61746178        ASMNopPause();
     6179#endif
    61756180    uFlags    = ASMIntDisableFlags();
    61766181    idApic    = ASMGetApicId();
     
    65286533    PSUPGLOBALINFOPAGE pGip = pDevExt->pGip;
    65296534
    6530     /*
    6531      * Synchronize with the host OS clock tick before reading the TSC.
    6532      * Especially important on Windows where the granularity is terrible.
    6533      */
    6534     u64NanoTS = RTTimeSystemNanoTS();
    6535     while (u64NanoTS == RTTimeSystemNanoTS())
    6536         ASMNopPause();
    6537 
    65386535    uFlags    = ASMIntDisableFlags(); /* No interruptions please (real problem on S10). */
    65396536    u64TSC    = ASMReadTSC();
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