From: wolfgang Date: Wed, 10 Nov 2004 04:17:59 +0000 (+0000) Subject: [project @ 2004-11-10 04:17:50 by wolfgang] X-Git-Tag: Initial_conversion_from_CVS_complete~1456 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=845db8182942e006a9164e41e9839adb39f24268 [project @ 2004-11-10 04:17:50 by wolfgang] 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. --- diff --git a/ghc/includes/GranSim.h b/ghc/includes/GranSim.h index 0fe366d..32f37ff 100644 --- a/ghc/includes/GranSim.h +++ b/ghc/includes/GranSim.h @@ -1,6 +1,6 @@ /* Time-stamp: - $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 )) { \ diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 04e70da..851a957 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -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; diff --git a/ghc/rts/Schedule.h b/ghc/rts/Schedule.h index 59d900f..516cabf 100644 --- a/ghc/rts/Schedule.h +++ b/ghc/rts/Schedule.h @@ -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 */