Stopped getourtimeofday() being called under mingwin.
MBlock.c: changed one instance of 128 * 1024 * 1024 into SIZE_RESERVED_POOL
and added a TODO comment (bug in is_heap_alloced(), which won't work if
more than one megablock is ever allocated).
* Copyright (c) 1994-1998.
*
* $RCSfile: Evaluator.c,v $
- * $Revision: 1.45 $
- * $Date: 2000/03/20 15:49:56 $
+ * $Revision: 1.46 $
+ * $Date: 2000/04/03 15:24:21 $
* ---------------------------------------------------------------------------*/
#include "Rts.h"
cap->rCurrentTSO->why_blocked = BlockedOnDelay;
ACQUIRE_LOCK(&sched_mutex);
-#if defined(HAVE_SETITIMER)
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
cap->rCurrentTSO->block_info.delay
= hugsBlock.delay + ticks_since_select;
#else
/* -----------------------------------------------------------------------------
- * $Id: MBlock.c,v 1.14 2000/01/22 12:06:43 simonmar Exp $
+ * $Id: MBlock.c,v 1.15 2000/04/03 15:24:21 rrt Exp $
*
* (c) The GHC Team 1998-1999
*
#define SIZE_RESERVED_POOL ( 128 * 1024 * 1024 )
/* This predicate should be inlined, really. */
+/* TODO: this only works for a single chunk */
int
is_heap_alloced(const void* x)
{
return (((char*)(x) >= base_non_committed) &&
- ((char*)(x) <= (base_non_committed + 128 * 1024 * 1024)));
+ ((char*)(x) <= (base_non_committed + SIZE_RESERVED_POOL)));
}
void *
/* ---------------------------------------------------------------------------
- * $Id: Schedule.c,v 1.60 2000/03/31 03:09:36 hwloidl Exp $
+ * $Id: Schedule.c,v 1.61 2000/04/03 15:24:21 rrt Exp $
*
* (c) The GHC Team, 1998-2000
*
fprintf(stderr,"blocked on write to fd %d", tso->block_info.fd);
break;
case BlockedOnDelay:
-#if defined(HAVE_SETITIMER)
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
fprintf(stderr,"blocked on delay of %d ms", tso->block_info.delay);
#else
fprintf(stderr,"blocked on delay of %d ms",
/* -----------------------------------------------------------------------------
- * $Id: Select.c,v 1.11 2000/03/23 12:02:38 simonmar Exp $
+ * $Id: Select.c,v 1.12 2000/04/03 15:24:21 rrt Exp $
*
* (c) The GHC Team 1995-1999
*
case BlockedOnDelay:
{
int candidate; /* signed int is intentional */
-#if defined(HAVE_SETITIMER)
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
candidate = tso->block_info.delay;
#else
candidate = tso->block_info.target - getourtimeofday();
case BlockedOnDelay:
{
-#if defined(HAVE_SETITIMER)
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
if (tso->block_info.delay > delta) {
tso->block_info.delay -= delta;
ready = 0;