[project @ 2003-08-16 11:19:07 by igloo]
[ghc-hetmet.git] / ghc / rts / Itimer.c
index f1dd823..74801db 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: Itimer.c,v 1.32 2003/02/22 04:51:50 sof Exp $
+ * $Id: Itimer.c,v 1.35 2003/03/29 00:27:11 sof Exp $
  *
  * (c) The GHC Team, 1995-1999
  *
@@ -18,7 +18,6 @@
  * to support.  So much for standards.
  */
 #include "Rts.h"
-#if !defined(mingw32_TARGET_OS) /* to the end */
 #include "RtsFlags.h"
 #include "Timer.h"
 #include "Itimer.h"
@@ -43,7 +42,7 @@
 
 static
 int
-install_vtalrm_handler(void)
+install_vtalrm_handler(TickProc handle_tick)
 {
     struct sigaction action;
 
@@ -56,7 +55,7 @@ install_vtalrm_handler(void)
 }
 
 int
-startTicker(nat ms)
+startTicker(nat ms, TickProc handle_tick)
 {
 # ifndef HAVE_SETITIMER
   /*    fprintf(stderr, "No virtual timer on this system\n"); */
@@ -64,7 +63,7 @@ startTicker(nat ms)
 # else
     struct itimerval it;
 
-    install_vtalrm_handler();
+    install_vtalrm_handler(handle_tick);
 
     timestamp = getourtimeofday();
 
@@ -136,6 +135,8 @@ stopTicker()
 }
 # endif
 
+#if 0
+/* Currently unused */
 void
 block_vtalrm_signal(void)
 {
@@ -157,6 +158,7 @@ unblock_vtalrm_signal(void)
 
     (void) sigprocmask(SIG_UNBLOCK, &signals, NULL);
 }
+#endif
 
 /* gettimeofday() takes around 1us on our 500MHz PIII.  Since we're
  * only calling it 50 times/s, it shouldn't have any great impact.
@@ -170,4 +172,3 @@ getourtimeofday(void)
          tv.tv_usec * TICK_FREQUENCY / 1000000);
 }
 
-#endif /* !mingw32_TARGET_OS */