diff --git a/ghc/rts/Evaluator.c b/ghc/rts/Evaluator.c index 4aa5dcf57a057496e732879b8af05b3130760efd..b7906f7589ec34158b9d3ca5a3106508029c0de8 100644 --- a/ghc/rts/Evaluator.c +++ b/ghc/rts/Evaluator.c @@ -5,8 +5,8 @@ * 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" @@ -530,7 +530,7 @@ StgThreadReturnCode enter( Capability* cap, StgClosure* obj0 ) 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 diff --git a/ghc/rts/MBlock.c b/ghc/rts/MBlock.c index 5054760df118ddd4879cd314efa354607d382a7a..c0a619fbad87388faa202a76eeaf0a93c6008ec6 100644 --- a/ghc/rts/MBlock.c +++ b/ghc/rts/MBlock.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -152,11 +152,12 @@ char* base_non_committed = (char*)0; #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 * diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index c0de8b0b0d72cea951267c5224b0cfdb0f35ac7e..413bfa88a9ec01479d36060b5299bfec91f471bf 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* --------------------------------------------------------------------------- - * $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 * @@ -2893,7 +2893,7 @@ printThreadBlockage(StgTSO *tso) 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", diff --git a/ghc/rts/Select.c b/ghc/rts/Select.c index 49c84ff6bf0e054806777508ad3cc8d259c0ee70..79b21ba487bc93dbff19c1bca0898fb14e0197e1 100644 --- a/ghc/rts/Select.c +++ b/ghc/rts/Select.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $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 * @@ -107,7 +107,7 @@ awaitEvent(rtsBool wait) 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(); @@ -222,7 +222,7 @@ awaitEvent(rtsBool wait) 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;