X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2FRegs.h;h=6524c8f669c79a97d965123e5013e939c0a49003;hb=2777940384ce4740954062bedd0f6813698fc72a;hp=bd7cb5325544adaa79fa1a90163de22a542c2cf8;hpb=1e3d53b4707a6c9c7c99cdaa54e3646b840f5cc9;p=ghc-hetmet.git diff --git a/includes/Regs.h b/includes/Regs.h index bd7cb53..6524c8f 100644 --- a/includes/Regs.h +++ b/includes/Regs.h @@ -22,7 +22,13 @@ #ifndef REGS_H #define REGS_H +#if defined(HAVE_FRAMEWORK_GMP) +#include +#elif defined(HAVE_LIB_GMP) +#include +#else #include "gmp.h" // Needs MP_INT definition +#endif /* * Spark pools: used to store pending sparks @@ -117,9 +123,7 @@ typedef struct StgRegTable_ { MP_INT rmp_result1; MP_INT rmp_result2; StgWord rRet; // holds the return code of the thread -#if defined(THREADED_RTS) || defined(PAR) StgSparkPool rSparks; /* per-task spark pool */ -#endif } StgRegTable; #if IN_STG_CODE @@ -335,7 +339,7 @@ struct PartCapability_ { /* No such thing as a MainCapability under THREADED_RTS - each thread must have * its own Capability. */ -#if IN_STG_CODE && !defined(THREADED_RTS) +#if IN_STG_CODE && !(defined(THREADED_RTS) && !defined(NOSMP)) extern W_ MainCapability[]; #endif @@ -351,7 +355,7 @@ extern W_ MainCapability[]; GLOBAL_REG_DECL(StgRegTable *,BaseReg,REG_Base) #define ASSIGN_BaseReg(e) (BaseReg = (e)) #else -#ifdef THREADED_RTS +#if defined(THREADED_RTS) && !defined(NOSMP) #error BaseReg must be in a register for THREADED_RTS #endif #define BaseReg (&((struct PartCapability_ *)MainCapability)->r)