-// Test whether the current transaction context is valid, i.e. whether
-// it is still possible for it to commit successfully. Note: we assume that
-// once stmValidateTransaction has returned FALSE for a given transaction then
-// that transaction will never again be valid -- we rely on this in Schedule.c when
-// kicking invalid threads at GC (in case they are stuck looping)
-
-extern StgBool stmValidateTransaction(StgTRecHeader *trec);
-
-// Test whether the current transaction context is valid and, if so,
-// commit its memory accesses to the heap. stmCommitTransaction must
-// unblock any threads which are waiting on tvars that updates have
-// been committed to.
-
-extern StgBool stmCommitTransaction(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.
-
-extern StgBool stmWait(StgTSO *tso, 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
-// transaction context is no longer valid then stop the thread waiting
-// and leave it as unblocked. It is an error to call stmReWait if the
-// thread is not waiting.
+/*
+ * Test whether the current transaction context is valid and, if so,
+ * commit its memory accesses to the heap. stmCommitTransaction must
+ * unblock any threads which are waiting on tvars that updates have
+ * been committed to.
+ */
+
+extern StgBool stmCommitTransaction(Capability *cap, StgTRecHeader *trec);
+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.
+ */
+
+extern StgBool stmWait(Capability *cap,
+ StgTSO *tso,
+ 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
+ * transaction context is no longer valid then stop the thread waiting
+ * and leave it as unblocked. It is an error to call stmReWait if the
+ * thread is not waiting.
+ */