X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FStorage.h;h=a04a41187cc8ae5584a223269b93ccd64eac1002;hb=eba7b660a36878cd8d926845807913d7ec5734c9;hp=8cfd5116620f355dd4a39e903090ed9927108c61;hpb=beb5737b7ee42c4e9373a505e7d957206d69a30e;p=ghc-hetmet.git diff --git a/ghc/includes/Storage.h b/ghc/includes/Storage.h index 8cfd511..a04a411 100644 --- a/ghc/includes/Storage.h +++ b/ghc/includes/Storage.h @@ -140,7 +140,7 @@ extern void exitStorage(void); via allocate() since the last GC. Used in the reporting of statistics. - SMP: allocate and doYouWantToGC can be used from STG code, they are + THREADED_RTS: allocate and doYouWantToGC can be used from STG code, they are surrounded by a mutex. -------------------------------------------------------------------------- */ @@ -198,11 +198,11 @@ extern void GarbageCollect(void (*get_roots)(evac_fn),rtsBool force_major_gc); /* * Storage manager mutex */ -#if defined(SMP) +#if defined(THREADED_RTS) extern Mutex sm_mutex; #endif -#if defined(SMP) +#if defined(THREADED_RTS) #define ACQUIRE_SM_LOCK ACQUIRE_LOCK(&sm_mutex); #define RELEASE_SM_LOCK RELEASE_LOCK(&sm_mutex); #define ASSERT_SM_LOCK() ASSERT_LOCK_HELD(&sm_mutex); @@ -269,7 +269,7 @@ extern rtsBool keepCAFs; and is put on the mutable list. -------------------------------------------------------------------------- */ -void dirty_MUT_VAR(StgClosure *p); +void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); /* ----------------------------------------------------------------------------- DEBUGGING predicates for pointers @@ -375,6 +375,8 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info) case FUN_2_0: case CONSTR_2_0: return sizeofW(StgHeader) + 2; + case THUNK: + return thunk_sizeW_fromITBL(info); case THUNK_SELECTOR: return THUNK_SELECTOR_sizeW(); case AP_STACK: @@ -411,6 +413,7 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info) } } +// The definitive way to find the size, in words, of a heap-allocated closure STATIC_INLINE nat closure_sizeW (StgClosure *p) {