use ia32_cap() instead of direct access to cap var
This was SVN commit r580.
This commit is contained in:
parent
8c8a692025
commit
d231baccef
@ -29,10 +29,12 @@
|
||||
#include <algorithm>
|
||||
#include <numeric>
|
||||
|
||||
#include "wdbg.h"
|
||||
|
||||
|
||||
// define to disable time sources (useful for simulating other systems)
|
||||
// #define NO_QPC
|
||||
// #define NO_TSC
|
||||
//#define NO_QPC
|
||||
//#define NO_TSC
|
||||
|
||||
|
||||
#pragma data_seg(".LIB$WIA")
|
||||
@ -142,7 +144,7 @@ static int choose_impl()
|
||||
// frequency changes are too often and drastic to correct,
|
||||
// and we don't want to mess with the system power settings.
|
||||
// => unsafe.
|
||||
if(cpu_caps & TSC && cpu_freq > 0.0)
|
||||
if(ia32_cap(TSC) && cpu_freq > 0.0)
|
||||
{
|
||||
safe = (cpus == 1 && !cpu_speedstep);
|
||||
SAFETY_OVERRIDE(HRT_TSC);
|
||||
@ -225,7 +227,6 @@ static int choose_impl()
|
||||
return 0;
|
||||
}
|
||||
|
||||
// no warning here - doesn't inspire confidence in VC dead code removal.
|
||||
debug_warn("hrt_choose_impl: no safe timer found!");
|
||||
hrt_impl = HRT_NONE;
|
||||
hrt_nominal_freq = -1;
|
||||
|
@ -71,8 +71,8 @@ extern int clock_getres(clockid_t clock, struct timespec* res);
|
||||
|
||||
|
||||
// HACK: if _WIN32, the HRT makes its final implementation choice
|
||||
// in the first calibrate call where cpu_freq and cpu_caps are
|
||||
// available. provide a routine that makes the choice when called,
|
||||
// in the first calibrate call where cpu_freq is available.
|
||||
// provide a routine that makes the choice when called,
|
||||
// so app code isn't surprised by a timer change, although the HRT
|
||||
// does try to keep the timer continuous.
|
||||
extern void wtime_reset_impl();
|
||||
|
Loading…
Reference in New Issue
Block a user