X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FSTM.h;h=4c2b109f73ab33923ced896c9a47fe1335656238;hb=76c0086f090327eecaf510de8bc4efc4dee996dc;hp=b74d2bbdf65f60ef129d35464993517bb221e38f;hpb=03a9ff01812afc81eb5236fd3063cbec44cf469e;p=ghc-hetmet.git diff --git a/ghc/includes/STM.h b/ghc/includes/STM.h index b74d2bb..4c2b109 100644 --- a/ghc/includes/STM.h +++ b/ghc/includes/STM.h @@ -33,7 +33,7 @@ #ifndef STM_H #define STM_H -#ifdef SMP +#ifdef THREADED_RTS //#define STM_CG_LOCK #define STM_FG_LOCKS #else @@ -46,13 +46,10 @@ extern "C" { /*---------------------------------------------------------------------- - Start of day - ------------ - + GC interaction + -------------- */ -extern void initSTM(void); - extern void stmPreGCHook(void); /*---------------------------------------------------------------------- @@ -76,7 +73,7 @@ extern StgTRecHeader *stmStartNestedTransaction(Capability *cap, StgTRecHeader * * transaction contexts doomed to abort. */ -extern void stmAbortTransaction(StgTRecHeader *trec); +extern void stmAbortTransaction(Capability *cap, StgTRecHeader *trec); /* * Ensure that a subsequent commit / validation will fail. We use this @@ -87,7 +84,7 @@ extern void stmAbortTransaction(StgTRecHeader *trec); * in case other threads' updates make it valid in the mean time. */ -extern void stmCondemnTransaction(StgTRecHeader *trec); +extern void stmCondemnTransaction(Capability *cap, StgTRecHeader *trec); /* * Return the trec within which the specified trec was created (not @@ -165,13 +162,15 @@ extern StgBool stmCommitNestedTransaction(Capability *cap, StgTRecHeader *trec); * Test whether the current transaction context is valid and, if so, * start the thread waiting for updates to any of the tvars it has * ready from and mark it as blocked. It is an error to call stmWait - * if the thread is already waiting. + * if the thread is already waiting. */ extern StgBool stmWait(Capability *cap, StgTSO *tso, StgTRecHeader *trec); +extern void stmWaitUnlock(Capability *cap, StgTRecHeader *trec); + /* * Test whether the current transaction context is valid and, if so, * leave the thread waiting and mark it as blocked again. If the @@ -180,7 +179,7 @@ extern StgBool stmWait(Capability *cap, * thread is not waiting. */ -extern StgBool stmReWait(StgTSO *tso); +extern StgBool stmReWait(Capability *cap, StgTSO *tso); /*----------------------------------------------------------------------