diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Rts.h | 11 | ||||
-rw-r--r-- | includes/RtsExternal.h | 3 | ||||
-rw-r--r-- | includes/Stg.h | 4 | ||||
-rw-r--r-- | includes/Storage.h | 8 | ||||
-rw-r--r-- | includes/mkDerivedConstants.c | 1 |
5 files changed, 16 insertions, 11 deletions
diff --git a/includes/Rts.h b/includes/Rts.h index 7a30d9ee52..7ed9c2d9b4 100644 --- a/includes/Rts.h +++ b/includes/Rts.h @@ -18,6 +18,12 @@ extern "C" { #endif #include "Stg.h" +// Turn off inlining when debugging - it obfuscates things +#ifdef DEBUG +# undef STATIC_INLINE +# define STATIC_INLINE static +#endif + #include "RtsTypes.h" #if __GNUC__ >= 3 @@ -138,16 +144,13 @@ extern void _assertFail (const char *, unsigned int); #include "OSThreads.h" #include "SMP.h" -/* STG/Optimised-C related stuff */ -#include "Block.h" - /* GNU mp library */ #include "gmp.h" /* Macros for STG/C code */ +#include "Block.h" #include "ClosureMacros.h" #include "StgTicky.h" -#include "Stable.h" /* Runtime-system hooks */ #include "Hooks.h" diff --git a/includes/RtsExternal.h b/includes/RtsExternal.h index 3000059cc3..d96762020e 100644 --- a/includes/RtsExternal.h +++ b/includes/RtsExternal.h @@ -83,9 +83,6 @@ extern void* allocateExec(unsigned int len); Storage manager stuff exported -------------------------------------------------------------------------- */ -/* Prototype for an evacuate-like function */ -typedef void (*evac_fn)(StgClosure **); - extern void performGC(void); extern void performMajorGC(void); extern HsInt64 getAllocations( void ); diff --git a/includes/Stg.h b/includes/Stg.h index 5cd3701c0f..1facd5f405 100644 --- a/includes/Stg.h +++ b/includes/Stg.h @@ -66,7 +66,9 @@ #define BITS_IN(x) (BITS_PER_BYTE * sizeof(x)) /* - * 'Portable' inlining + * 'Portable' inlining: + * INLINE_HEADER is for inline functions in header files + * STATIC_INLINE is for inline functions in source files */ #if defined(__GNUC__) || defined( __INTEL_COMPILER) # define INLINE_HEADER static inline diff --git a/includes/Storage.h b/includes/Storage.h index 09b1b04881..12be6d19d0 100644 --- a/includes/Storage.h +++ b/includes/Storage.h @@ -185,7 +185,7 @@ extern void freeExec (void *p); MarkRoot(StgClosure *p) Returns the new location of the root. -------------------------------------------------------------------------- */ -extern void GarbageCollect(void (*get_roots)(evac_fn),rtsBool force_major_gc); +extern void GarbageCollect(rtsBool force_major_gc); /* ----------------------------------------------------------------------------- Generational garbage collection support @@ -362,7 +362,7 @@ INLINE_HEADER StgWord tso_sizeW ( StgTSO *tso ) INLINE_HEADER StgWord bco_sizeW ( StgBCO *bco ) { return bco->size; } -STATIC_INLINE nat +INLINE_HEADER nat closure_sizeW_ (StgClosure *p, StgInfoTable *info) { switch (info->type) { @@ -428,7 +428,7 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info) } // The definitive way to find the size, in words, of a heap-allocated closure -STATIC_INLINE nat +INLINE_HEADER nat closure_sizeW (StgClosure *p) { return closure_sizeW_(p, get_itbl(p)); @@ -483,6 +483,8 @@ extern lnat countNurseryBlocks ( void ); Functions from GC.c -------------------------------------------------------------------------- */ +typedef void (*evac_fn)(StgClosure **); + extern void threadPaused ( Capability *cap, StgTSO * ); extern StgClosure * isAlive ( StgClosure *p ); extern void markCAFs ( evac_fn evac ); diff --git a/includes/mkDerivedConstants.c b/includes/mkDerivedConstants.c index ded645ca03..ec081fb945 100644 --- a/includes/mkDerivedConstants.c +++ b/includes/mkDerivedConstants.c @@ -23,6 +23,7 @@ #include "Rts.h" #include "RtsFlags.h" #include "Storage.h" +#include "Stable.h" #include "OSThreads.h" #include "Capability.h" |