Author: Armin Rigo <[email protected]>
Branch: use-gcc
Changeset: r1952:4b10f9b403dd
Date: 2015-09-03 12:37 +0200
http://bitbucket.org/pypy/stmgc/changeset/4b10f9b403dd/

Log:    Right, write_fence() is done by stm_allocate_preexisting(), which
        guarantees that it returns an object that is already correct when
        viewed from other threads.

diff --git a/c8/stm/hashtable.c b/c8/stm/hashtable.c
--- a/c8/stm/hashtable.c
+++ b/c8/stm/hashtable.c
@@ -326,12 +326,6 @@
                 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

Reply via email to