Author: Armin Rigo <[email protected]>
Branch: stmgc-c8-gcc
Changeset: r79362:5da67ac26dce
Date: 2015-09-01 18:11 +0200
http://bitbucket.org/pypy/pypy/changeset/5da67ac26dce/
Log: import stmgc/bba995bf44bc
diff --git a/rpython/translator/stm/src_stm/revision
b/rpython/translator/stm/src_stm/revision
--- a/rpython/translator/stm/src_stm/revision
+++ b/rpython/translator/stm/src_stm/revision
@@ -1,1 +1,1 @@
-58f9e6d56296
+bba995bf44bc
diff --git a/rpython/translator/stm/src_stm/stm/hashtable.c
b/rpython/translator/stm/src_stm/stm/hashtable.c
--- a/rpython/translator/stm/src_stm/stm/hashtable.c
+++ b/rpython/translator/stm/src_stm/stm/hashtable.c
@@ -326,6 +326,12 @@
stm_allocate_preexisting(sizeof(stm_hashtable_entry_t),
(char *)&initial.header);
hashtable->additions++;
+ /* make sure .object is NULL in all segments before
+ "publishing" the entry in the hashtable. In other words,
+ the following write_fence() prevents a partially
+ initialized 'entry' from showing up in table->items[i],
+ where it could be read from other threads. */
+ write_fence();
}
table->items[i] = entry;
write_fence(); /* make sure 'table->items' is written here */
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit