diff --git a/C/sysbits.c b/C/sysbits.c index 497ed2a07..4725607c6 100755 --- a/C/sysbits.c +++ b/C/sysbits.c @@ -477,8 +477,12 @@ InitTime (int wid) Times_last_time = TimesStartOfTimes = t; } else { #if THREADS + REMOTE_ThreadHandle(wid).start_of_timesp = (struct _FILETIME *)malloc(sizeof(FILETIME)); + REMOTE_ThreadHandle(wid).last_timep = (struct _FILETIME *)malloc(sizeof(FILETIME)); + REMOTE_ThreadHandle(wid).start_of_times_sysp = (struct _FILETIME *)malloc(sizeof(FILETIME)); + REMOTE_ThreadHandle(wid).last_time_sysp = (struct _FILETIME *)malloc(sizeof(FILETIME)); (*REMOTE_ThreadHandle(wid).last_timep).dwLowDateTime = - UserTime.dwLowDateTime;pp + UserTime.dwLowDateTime; (*REMOTE_ThreadHandle(wid).last_timep).dwHighDateTime = UserTime.dwHighDateTime; (*REMOTE_ThreadHandle(wid).start_of_timesp).dwLowDateTime = @@ -1494,8 +1498,8 @@ STATIC_PROTO (void my_signal, (int, void (*)(int))); static RETSIGTYPE HandleMatherr(int sig) { -#if HAVE_FETESTEXCEPT CACHE_REGS +#if HAVE_FETESTEXCEPT /* This should work in Linux, but it doesn't seem to. */ int raised = fetestexcept(FE_ALL_EXCEPT); diff --git a/H/Yap.h b/H/Yap.h index 910a8b8ef..a77e3d4c1 100755 --- a/H/Yap.h +++ b/H/Yap.h @@ -746,11 +746,16 @@ typedef struct thandle { #endif pthread_mutex_t tlock; pthread_mutex_t tlock_status; -#if HAVE_GETRUSAGE||defined(_WIN32) +#if HAVE_GETRUSAGE struct timeval *start_of_timesp; struct timeval *last_timep; struct timeval *start_of_times_sysp; struct timeval *last_time_sysp; +#elif _WIN32 + struct _FILETIME *start_of_timesp; + struct _FILETIME *last_timep; + struct _FILETIME *start_of_times_sysp; + struct _FILETIME *last_time_sysp; #endif } yap_thandle; #endif /* THREADS */