make the smp way RTS-only, normal libraries now work with -smp
[ghc-hetmet.git] / ghc / includes / Cmm.h
index d0dedb8..ea760a8 100644 (file)
 // whether the nursery is nearly empty in any function that uses
 // allocateLocal() - this includes many of the primops.
 #define MAYBE_GC(liveness,reentry)                     \
-   if (bdescr_link(CurrentNursery) == NULL) {          \
+  if (bdescr_link(CurrentNursery) == NULL || CInt[alloc_blocks] >= CInt[alloc_blocks_lim]) {           \
        R9  = liveness;                                 \
         R10 = reentry;                                 \
         jump stg_gc_gen_hp;                            \
  * the value from GHC, but it seems like too much trouble to do that
  * for StgThunkHeader.
  */
-#ifdef SMP
 #define SIZEOF_StgThunkHeader SIZEOF_StgHeader+SIZEOF_StgSMPThunkHeader
-#else
-#define SIZEOF_StgThunkHeader SIZEOF_StgHeader
-#endif
 
 #define StgThunk_payload(__ptr__,__ix__) \
     W_[__ptr__+SIZEOF_StgThunkHeader+ WDS(__ix__)]