Author: Tobias Weber <tobias_webe...@gmx.de>
Branch: c8-adaptive-trx-length-per-thread
Changeset: r2125:c1b97c862a98
Date: 2017-07-13 21:43 +0200
http://bitbucket.org/pypy/stmgc/changeset/c1b97c862a98/

Log:    Merge commit signalling fix

diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -1178,6 +1178,7 @@
     _do_start_transaction(tl);
     continue_timer();
 
+    STM_PSEGMENT->commit_if_not_atomic = false;
     STM_SEGMENT->nursery_mark = ((stm_char *)_stm_nursery_start +
                                         stm_get_transaction_length(tl));
 
diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -542,8 +542,9 @@
     pseg->pub.nursery_current = (stm_char *)_stm_nursery_start;
     pseg->pub.nursery_mark -= nursery_used;
 
+    assert((pseg->transaction_state == TS_INEVITABLE) || 
!pseg->commit_if_not_atomic)
     if (pseg->commit_if_not_atomic
-        // && pseg->transaction_state == TS_INEVITABLE // TODO why does this 
break the mechanism?
+        && pseg->transaction_state == TS_INEVITABLE
         && pseg->pub.running_thread->self_or_0_if_atomic != 0) {
         // transaction is inevitable, not atomic, and commit has been 
signalled by waiting thread: commit immediately
         pseg->pub.nursery_mark = 0;
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to