[project @ 2005-10-26 10:42:54 by simonmar]
[ghc-hetmet.git] / ghc / includes / Regs.h
index 7333f2d..f1b8597 100644 (file)
@@ -98,11 +98,10 @@ typedef struct StgRegTable_ {
   MP_INT          rmp_tmp2;      
   MP_INT          rmp_result1;
   MP_INT          rmp_result2;
+  StgWord         rRet;  // holds the return code of the thread
 #if defined(SMP) || defined(PAR)
   StgSparkPool    rSparks;     /* per-task spark pool */
 #endif
-    // If this flag is set, we are running Haskell code.  Used to detect
-    // uses of 'foreign import unsafe' that should be 'safe'.
 } StgRegTable;
 
 #if IN_STG_CODE
@@ -328,7 +327,7 @@ GLOBAL_REG_DECL(StgRegTable *,BaseReg,REG_Base)
 #ifdef SMP
 #error BaseReg must be in a register for SMP
 #endif
-#define BaseReg (&((struct Capability_)MainCapability).r)
+#define BaseReg (&((struct PartCapability_ *)MainCapability)->r)
 #endif
 
 #if defined(REG_Sp) && !defined(NO_GLOBAL_REG_DECLS)