< prev index next >

src/share/vm/gc/parallel/vmStructs_parallelgc.hpp

Print this page
rev 10742 : Make fields used in lock-free algorithms volatile

@@ -24,10 +24,11 @@
 
 #ifndef SHARE_VM_GC_PARALLEL_VMSTRUCTS_PARALLELGC_HPP
 #define SHARE_VM_GC_PARALLEL_VMSTRUCTS_PARALLELGC_HPP
 
 #define VM_STRUCTS_PARALLELGC(nonstatic_field, \
+                              volatile_nonstatic_field, \
                    static_field) \
                                                                                                                                      \
   /**********************/                                                                                                           \
   /* Parallel GC fields */                                                                                                           \
   /**********************/                                                                                                           \

@@ -38,11 +39,11 @@
   nonstatic_field(PSVirtualSpace,              _committed_high_addr,                          char*)                                 \
                                                                                                                                      \
   nonstatic_field(ImmutableSpace,              _bottom,                                       HeapWord*)                             \
   nonstatic_field(ImmutableSpace,              _end,                                          HeapWord*)                             \
                                                                                                                                      \
-  nonstatic_field(MutableSpace,                _top,                                          HeapWord*)                             \
+  volatile_nonstatic_field(MutableSpace,       _top,                                          HeapWord*)                             \
                                                                                                                                      \
   nonstatic_field(PSYoungGen,                  _reserved,                                     MemRegion)                             \
   nonstatic_field(PSYoungGen,                  _virtual_space,                                PSVirtualSpace*)                       \
   nonstatic_field(PSYoungGen,                  _eden_space,                                   MutableSpace*)                         \
   nonstatic_field(PSYoungGen,                  _from_space,                                   MutableSpace*)                         \
< prev index next >