Author: Tobias Weber <tobias_webe...@gmx.de>
Branch: c8-efficient-serial-execution-master
Changeset: r2108:b5c1dadb9699
Date: 2017-07-13 21:40 +0200
http://bitbucket.org/pypy/stmgc/changeset/b5c1dadb9699/

Log:    Fix commit signal was not reset on transaction start

diff --git a/c8/stm/core.c b/c8/stm/core.c
--- a/c8/stm/core.c
+++ b/c8/stm/core.c
@@ -1116,6 +1116,7 @@
     }
     _do_start_transaction(tl);
 
+    STM_PSEGMENT->commit_if_not_atomic = false;
     if (repeat_count == 0) {  /* else, 'nursery_mark' was already set
                                  in abort_data_structures_from_segment_num() */
         STM_SEGMENT->nursery_mark = ((stm_char *)_stm_nursery_start +
diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -500,8 +500,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