[pypy-commit] stmgc queue: Aaaaaaaa ok found the next bug
arigo
noreply at buildbot.pypy.org
Thu Jun 18 23:24:55 CEST 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: queue
Changeset: r1870:10bb05551db5
Date: 2015-06-18 21:23 +0200
http://bitbucket.org/pypy/stmgc/changeset/10bb05551db5/
Log: Aaaaaaaa ok found the next bug
diff --git a/c8/stm/queue.c b/c8/stm/queue.c
--- a/c8/stm/queue.c
+++ b/c8/stm/queue.c
@@ -250,6 +250,11 @@
}
retry:
+ /* careful, STM_SEGMENT->segment_num may change here because
+ we're starting new transactions below! */
+ seg = &queue->segs[STM_SEGMENT->segment_num - 1];
+ assert(!seg->added_in_this_transaction);
+
/* can't easily use compare_and_swap here. The issue is that
if we do "compare_and_swap(&old_entry, entry, entry->next)",
then we need to read entry->next, but a parallel thread
More information about the pypy-commit
mailing list