[hazard pointers] add write barrier on clear as well
authorBernhard Urban <bernhard.urban@xamarin.com>
Wed, 3 Feb 2016 18:09:31 +0000 (10:09 -0800)
committerBernhard Urban <bernhard.urban@xamarin.com>
Wed, 3 Feb 2016 18:09:37 +0000 (10:09 -0800)
mono/utils/hazard-pointer.h

index 1e49bc1770ab40926a1aa53cebd9da08cdddfb7f..540f743994c120406e3cf78fe7e7dbf81de1839f 100644 (file)
@@ -36,6 +36,7 @@ gpointer get_hazardous_pointer (gpointer volatile *pp, MonoThreadHazardPointers
 
 #define mono_hazard_pointer_clear(hp,i)        \
        do { g_assert ((i) >= 0 && (i) < HAZARD_POINTER_COUNT); \
+               mono_memory_write_barrier (); \
                (hp)->hazard_pointers [(i)] = NULL; \
        } while (0)