VirtualBox

Ignore:
Timestamp:
Feb 19, 2015 9:37:41 PM (10 years ago)
Author:
vboxsync
Message:

supdrvMeasureTscDeltaCallback: Changed it to pick the delta closest to zero instead of the smaller one.

File:
1 edited

Legend:

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

    r54315 r54316  
    73957395                        int64_t iDelta = pGipCpuWorker->u64TSCSample
    73967396                                       - (pGipCpuMaster->u64TSCSample - pGipCpuMaster->i64TSCDelta);
    7397                         /** @todo r=bird: Why isn't this code using absolute values? Guess it mostly works fine because
    7398                          * the detection code is biased thowards positive deltas (see tstSupTscDelta.cpp output) ... */
    7399                         if (iDelta < pGipCpuWorker->i64TSCDelta)
     7397                        if (  iDelta >= 0
     7398                            ? iDelta < pGipCpuWorker->i64TSCDelta
     7399                            : iDelta > pGipCpuWorker->i64TSCDelta || pGipCpuWorker->i64TSCDelta == INT64_MAX)
    74007400                            pGipCpuWorker->i64TSCDelta = iDelta;
    74017401                    }
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