From: sof Date: Thu, 16 Sep 1999 08:33:54 +0000 (+0000) Subject: [project @ 1999-09-16 08:33:54 by sof] X-Git-Tag: Approximately_9120_patches~5805 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=f2419006abee6d89fcf9792c78e5bb5d14babe7e;p=ghc-hetmet.git [project @ 1999-09-16 08:33:54 by sof] Disable timer ticks on 'pure' Win32 platforms unless really needed (for profiling) -- no reason to enable it elsewhere as the Win32 bits doesn't currently support thread{Delay,Wait{Read,Write}}# --- diff --git a/ghc/rts/Itimer.c b/ghc/rts/Itimer.c index bbbb3ad..7003e16 100644 --- a/ghc/rts/Itimer.c +++ b/ghc/rts/Itimer.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Itimer.c,v 1.5 1999/08/25 16:11:48 simonmar Exp $ + * $Id: Itimer.c,v 1.6 1999/09/16 08:33:54 sof Exp $ * * (c) The GHC Team, 1995-1999 * @@ -96,10 +96,16 @@ TIMECALLBACK *vtalrm_cback; nat initialize_virtual_timer(nat ms) { - /* VTALRM is currently not supported by cygwin32, - so we use the Timer support provided by the - MultiMedia API that is part of Win32. The - parameters to timeSetEvent may require some tweaking. +# ifdef PROFILING + /* On Win32 setups that don't have support for + setitimer(), we use the MultiMedia API's timer + support. + + As the delivery of ticks isn't free, we only + enable it if we really needed, i.e., when profiling. + (the RTS now also needs timer ticks to implement + threadDelay in non-profiling mode, but the pure + Win32 port doesn't support that.....yet.) */ unsigned int delay,vtalrm_id; @@ -113,6 +119,7 @@ initialize_virtual_timer(nat ms) (LPTIMECALLBACK)vtalrm_cback, 0, TIME_PERIODIC); +# endif return 0; }