diff options
Diffstat (limited to 'rts')
-rw-r--r-- | rts/PrimOps.cmm | 2 | ||||
-rw-r--r-- | rts/Schedule.c | 2 | ||||
-rw-r--r-- | rts/ghc.mk | 5 | ||||
-rw-r--r-- | rts/posix/GetTime.c | 8 |
4 files changed, 7 insertions, 10 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index 2ab26f7ba4..9cedabdca8 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -35,7 +35,7 @@ import base_ControlziExceptionziBase_nestedAtomically_closure; import EnterCriticalSection; import LeaveCriticalSection; import ghczmprim_GHCziTypes_False_closure; -#if defined(GhcUnregisterised) || !defined(mingw32_HOST_OS) +#if defined(USE_MINIINTERPRETER) || !defined(mingw32_HOST_OS) import sm_mutex; #endif diff --git a/rts/Schedule.c b/rts/Schedule.c index fe346afe19..755f306e58 100644 --- a/rts/Schedule.c +++ b/rts/Schedule.c @@ -611,7 +611,7 @@ schedulePreLoop(void) { // initialisation for scheduler - what cannot go into initScheduler() -#if defined(mingw32_HOST_OS) && !defined(GhcUnregisterised) +#if defined(mingw32_HOST_OS) && !defined(USE_MINIINTERPRETER) win32AllocStack(); #endif } diff --git a/rts/ghc.mk b/rts/ghc.mk index 5ae6b1ac3b..9fdf6bebb5 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -316,11 +316,6 @@ rts/RtsUtils_CC_OPTS += -DTargetVendor=\"$(TargetVendor_CPP)\" rts/RtsUtils_CC_OPTS += -DGhcUnregisterised=\"$(GhcUnregisterised)\" rts/RtsUtils_CC_OPTS += -DGhcEnableTablesNextToCode=\"$(GhcEnableTablesNextToCode)\" -ifeq "$(GhcUnregisterised)" "YES" -rts/PrimOps_HC_OPTS += -DGhcUnregisterised=1 -rts/Schedule_CC_OPTS += -DGhcUnregisterised=1 -endif - # Compile various performance-critical pieces *without* -fPIC -dynamic # even when building a shared library. If we don't do this, then the # GC runs about 50% slower on x86 due to the overheads of PIC. The diff --git a/rts/posix/GetTime.c b/rts/posix/GetTime.c index da8d0fa629..fabc40431d 100644 --- a/rts/posix/GetTime.c +++ b/rts/posix/GetTime.c @@ -34,7 +34,8 @@ // separately, using getrusage() and gettimeofday() respectively #ifdef darwin_HOST_OS -static double timer_scaling_factor_ns = 0.0; +static uint64_t timer_scaling_factor_numer = 0; +static uint64_t timer_scaling_factor_denom = 0; #endif void initializeTimer() @@ -42,7 +43,8 @@ void initializeTimer() #ifdef darwin_HOST_OS mach_timebase_info_data_t info; (void) mach_timebase_info(&info); - timer_scaling_factor_ns = (double)info.numer / (double)info.denom * 1e9; + timer_scaling_factor_numer = (uint64_t)info.numer; + timer_scaling_factor_denom = (uint64_t)info.denom; #endif } @@ -87,7 +89,7 @@ StgWord64 getMonotonicNSec(void) (StgWord64)ts.tv_nsec; #elif defined(darwin_HOST_OS) uint64_t time = mach_absolute_time(); - return (double)time * timer_scaling_factor_ns; + return (time * timer_scaling_factor_numer) / timer_scaling_factor_denom; #else struct timeval tv; |