From e62487b8fa138b115fa72e422ca155ac492fc81e Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 2 Mar 1999 20:04:04 +0000 Subject: [PATCH] [project @ 1999-03-02 20:04:03 by sof] mingw32 tweaks. --- ghc/rts/Schedule.c | 14 +++++++++++--- ghc/rts/Schedule.h | 7 +++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index a5a2362..8b65761 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.c,v 1.12 1999/02/26 16:46:50 simonm Exp $ + * $Id: Schedule.c,v 1.13 1999/03/02 20:04:03 sof Exp $ * * (c) The GHC Team, 1998-1999 * @@ -26,6 +26,13 @@ #include "Profiling.h" #include "Sanity.h" +#ifdef HAVE_WINDOWS_H +#include +#endif + +#define IS_CHARLIKE_CLOSURE(p) ( stgCast(StgPtr,p) >= stgCast(StgPtr,CHARLIKE_closure) && stgCast(char*,p) <= (stgCast(char*,CHARLIKE_closure) + 255 * sizeof(StgIntCharlikeClosure))) +#define IS_INTLIKE_CLOSURE(p) ( stgCast(StgPtr,p) >= stgCast(StgPtr,INTLIKE_closure) && stgCast(char*,p) <= (stgCast(char*,INTLIKE_closure) + 32 * sizeof(StgIntCharlikeClosure))) + StgTSO *run_queue_hd, *run_queue_tl; StgTSO *blocked_queue_hd, *blocked_queue_tl; StgTSO *ccalling_threads; @@ -187,7 +194,7 @@ void deleteThread(StgTSO *tso) * code, so we have to push a dummy closure on the top which just * returns to the next return address on the stack. */ - if (LOOKS_LIKE_GHC_INFO(*sp)) { + if ( LOOKS_LIKE_GHC_INFO(*sp) ) { *(--sp) = (W_)&dummy_ret_closure; } @@ -542,10 +549,11 @@ SchedulerStatus schedule(StgTSO *main, StgClosure **ret_val) } /* check for signals each time around the scheduler */ +#ifndef __MINGW32__ if (signals_pending()) { start_signal_handlers(); } - +#endif /* If our main thread has finished or been killed, return. * If we were re-entered as a result of a _ccall_gc, then * pop the blocked thread off the ccalling_threads stack back diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index e55d038..adaf078 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Schedule.h,v 1.3 1999/02/05 16:02:53 simonm Exp $ + * $Id: Schedule.h,v 1.4 1999/03/02 20:04:04 sof Exp $ * * (c) The GHC Team 1998-1999 * @@ -29,8 +29,11 @@ extern nat context_switch; extern StgTSO *run_queue_hd, *run_queue_tl; extern StgTSO *blocked_queue_hd, *blocked_queue_tl; +#ifdef COMPILING_RTS_MAIN +extern DLLIMPORT StgTSO *MainTSO; /* temporary hack */ +#else extern StgTSO *MainTSO; /* temporary hack */ - +#endif #define END_TSO_QUEUE ((StgTSO *)(void*)&END_TSO_QUEUE_closure) #define PUSH_ON_RUN_QUEUE(tso) \ -- 1.7.10.4