[pypy-commit] pypy stm-thread: Fix for corner cases of non-properly-nested atomic blocks.
arigo
noreply at buildbot.pypy.org
Thu Jun 7 18:18:03 CEST 2012
Author: Armin Rigo <arigo at tunes.org>
Branch: stm-thread
Changeset: r55474:e054fd8fe9d4
Date: 2012-06-07 18:17 +0200
http://bitbucket.org/pypy/pypy/changeset/e054fd8fe9d4/
Log: Fix for corner cases of non-properly-nested atomic blocks.
diff --git a/pypy/translator/stm/src_stm/core.c b/pypy/translator/stm/src_stm/core.c
--- a/pypy/translator/stm/src_stm/core.c
+++ b/pypy/translator/stm/src_stm/core.c
@@ -846,7 +846,11 @@
d->reads_size_limit_nonatomic = stm_regular_length_limit >> counter;
if (!d->atomic)
begin_transaction(&_jmpbuf);
+
+ /* invoke the callback in the new transaction */
result = callback(arg, counter);
+
+ v_atomic = d->atomic;
if (!d->atomic)
stm_commit_transaction();
counter = 0;
More information about the pypy-commit
mailing list