X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FStorage.c;h=4933854049a353ff5abd43b8fc7b0230f380d730;hb=2322bc9a89a9d8a6132a6818ccff6f665d7ed7f1;hp=195f410e5d41803cae94efcd222f2b5a9058a181;hpb=5d9f7faf4c6519af8da750919c986ffcda660030;p=ghc-hetmet.git diff --git a/ghc/rts/Storage.c b/ghc/rts/Storage.c index 195f410..4933854 100644 --- a/ghc/rts/Storage.c +++ b/ghc/rts/Storage.c @@ -51,14 +51,19 @@ ullong total_allocated = 0; /* total memory allocated during run */ nat n_nurseries = 0; /* == RtsFlags.ParFlags.nNodes, convenience */ step *nurseries = NULL; /* array of nurseries, >1 only if THREADED_RTS */ +#ifdef THREADED_RTS /* * Storage manager mutex: protects all the above state from * simultaneous access by two STG threads. */ -#ifdef THREADED_RTS Mutex sm_mutex; +/* + * This mutex is used by atomicModifyMutVar# only + */ +Mutex atomic_modify_mutvar_mutex; #endif + /* * Forward references */ @@ -127,6 +132,7 @@ initStorage( void ) #if defined(THREADED_RTS) initMutex(&sm_mutex); + initMutex(&atomic_modify_mutvar_mutex); #endif ACQUIRE_SM_LOCK;