#define STM_UNIPROC
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
+BEGIN_RTS_PRIVATE
/*----------------------------------------------------------------------
--------------
*/
-extern void stmPreGCHook(void);
+void stmPreGCHook(void);
/*----------------------------------------------------------------------
/* Create and enter a new transaction context */
-extern StgTRecHeader *stmStartTransaction(Capability *cap, StgTRecHeader *outer);
-extern StgTRecHeader *stmStartNestedTransaction(Capability *cap, StgTRecHeader *outer
+StgTRecHeader *stmStartTransaction(Capability *cap, StgTRecHeader *outer);
+StgTRecHeader *stmStartNestedTransaction(Capability *cap, StgTRecHeader *outer
);
/*
* to that read set could change whether or not the tx should abort.
*/
-extern void stmAbortTransaction(Capability *cap, StgTRecHeader *trec);
-extern void stmFreeAbortedTRec(Capability *cap, StgTRecHeader *trec);
+void stmAbortTransaction(Capability *cap, StgTRecHeader *trec);
+void stmFreeAbortedTRec(Capability *cap, StgTRecHeader *trec);
/*
* Ensure that a subsequent commit / validation will fail. We use this
* in case other threads' updates make it valid in the mean time.
*/
-extern void stmCondemnTransaction(Capability *cap, StgTRecHeader *trec);
-
-/*
- * Return the trec within which the specified trec was created (not
- * valid if trec==NO_TREC).
- */
-
-extern StgTRecHeader *stmGetEnclosingTRec(StgTRecHeader *trec);
+void stmCondemnTransaction(Capability *cap, StgTRecHeader *trec);
/*----------------------------------------------------------------------
threads at GC (in case they are stuck looping)
*/
-extern StgBool stmValidateNestOfTransactions(StgTRecHeader *trec);
+StgBool stmValidateNestOfTransactions(StgTRecHeader *trec);
/*----------------------------------------------------------------------
* transaction.
*/
-extern StgInvariantCheckQueue *stmGetInvariantsToCheck(Capability *cap,
- StgTRecHeader *trec);
+StgInvariantCheckQueue *stmGetInvariantsToCheck(Capability *cap,
+ StgTRecHeader *trec);
-extern void stmAddInvariantToCheck(Capability *cap,
- StgTRecHeader *trec,
- StgClosure *code);
+void stmAddInvariantToCheck(Capability *cap,
+ StgTRecHeader *trec,
+ StgClosure *code);
/*
* Test whether the current transaction context is valid and, if so,
* been committed to.
*/
-extern StgBool stmCommitTransaction(Capability *cap, StgTRecHeader *trec);
-extern StgBool stmCommitNestedTransaction(Capability *cap, StgTRecHeader *trec);
+StgBool stmCommitTransaction(Capability *cap, StgTRecHeader *trec);
+StgBool stmCommitNestedTransaction(Capability *cap, StgTRecHeader *trec);
/*
* Test whether the current transaction context is valid and, if so,
* if the thread is already waiting.
*/
-extern StgBool stmWait(Capability *cap,
- StgTSO *tso,
- StgTRecHeader *trec);
+StgBool stmWait(Capability *cap, StgTSO *tso, StgTRecHeader *trec);
-extern void stmWaitUnlock(Capability *cap, StgTRecHeader *trec);
+void stmWaitUnlock(Capability *cap, StgTRecHeader *trec);
/*
* Test whether the current transaction context is valid and, if so,
* thread is not waiting.
*/
-extern StgBool stmReWait(Capability *cap, StgTSO *tso);
+StgBool stmReWait(Capability *cap, StgTSO *tso);
/*----------------------------------------------------------------------
--------------------------
*/
-extern StgTVar *stmNewTVar(Capability *cap,
- StgClosure *new_value);
+StgTVar *stmNewTVar(Capability *cap, StgClosure *new_value);
/*----------------------------------------------------------------------
* thread's current transaction.
*/
-extern StgClosure *stmReadTVar(Capability *cap,
- StgTRecHeader *trec,
- StgTVar *tvar);
+StgClosure *stmReadTVar(Capability *cap,
+ StgTRecHeader *trec,
+ StgTVar *tvar);
/* Update the logical contents of 'tvar' within the context of the
* thread's current transaction.
*/
-extern void stmWriteTVar(Capability *cap,
- StgTRecHeader *trec,
- StgTVar *tvar,
- StgClosure *new_value);
+void stmWriteTVar(Capability *cap,
+ StgTRecHeader *trec,
+ StgTVar *tvar,
+ StgClosure *new_value);
/*----------------------------------------------------------------------*/
/*----------------------------------------------------------------------*/
-#ifdef __cplusplus
-}
-#endif
+END_RTS_PRIVATE
#endif /* STM_H */