[project @ 2004-11-10 04:17:50 by wolfgang]
authorwolfgang <unknown>
Wed, 10 Nov 2004 04:17:59 +0000 (04:17 +0000)
committerwolfgang <unknown>
Wed, 10 Nov 2004 04:17:59 +0000 (04:17 +0000)
64-bit fix:
Change the type of context_switch from 'nat' to 'int'.
It's accessed as CInt from cmm code, and sizeof(nat) > sizeof(int)
on many 64-bit platforms.

ghc/includes/GranSim.h
ghc/rts/Schedule.c
ghc/rts/Schedule.h

index 0fe366d..32f37ff 100644 (file)
@@ -1,6 +1,6 @@
 /*
   Time-stamp: <Fri Mar 24 2000 23:55:42 Stardate: [-30]4554.98 hwloidl>
-  $Id: GranSim.h,v 1.3 2000/03/31 03:09:35 hwloidl Exp $
+  $Id: GranSim.h,v 1.4 2004/11/10 04:17:50 wolfgang Exp $
   
   Headers for GranSim specific objects.
   
@@ -301,7 +301,7 @@ void GranSimBlock(StgTSO *tso, PEs proc, StgClosure *node);
 
 #define GRAN_YIELD(ptrs)                                   \
         {                                                   \
-          extern  nat context_switch;                          \
+          extern int context_switch;                          \
           if ( (CurrentTime[CurrentProc]>=EndOfTimeSlice) ||   \
                ((CurrentTime[CurrentProc]>=TimeOfNextEvent) && \
                (TimeOfNextEvent!=0) && !IgnoreEvents )) {     \
index 04e70da..851a957 100644 (file)
@@ -162,7 +162,7 @@ static StgTSO *threadStackOverflow(StgTSO *tso);
 */
 
 /* flag set by signal handler to precipitate a context switch */
-nat context_switch = 0;
+int context_switch = 0;
 
 /* if this flag is set as well, give up execution */
 rtsBool interrupted = rtsFalse;
index 59d900f..516cabf 100644 (file)
@@ -127,7 +127,7 @@ void    initThread(StgTSO *tso, nat stack_size);
 /* Context switch flag.
  * Locks required  : sched_mutex
  */
-extern nat RTS_VAR(context_switch);
+extern int RTS_VAR(context_switch);
 extern rtsBool RTS_VAR(interrupted);
 
 /* In Select.c */