/* -----------------------------------------------------------------------------
- * $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
*
* 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"
static
int
-install_vtalrm_handler(void)
+install_vtalrm_handler(TickProc handle_tick)
{
struct sigaction action;
}
int
-startTicker(nat ms)
+startTicker(nat ms, TickProc handle_tick)
{
# ifndef HAVE_SETITIMER
/* fprintf(stderr, "No virtual timer on this system\n"); */
# else
struct itimerval it;
- install_vtalrm_handler();
+ install_vtalrm_handler(handle_tick);
timestamp = getourtimeofday();
}
# endif
+#if 0
+/* Currently unused */
void
block_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.
tv.tv_usec * TICK_FREQUENCY / 1000000);
}
-#endif /* !mingw32_TARGET_OS */