hotspot/src/share/vm/classfile/classLoader.hpp
changeset 40887 8d35e19f5548
parent 40244 b3055c216762
child 41281 e1dc38ba642f
--- a/hotspot/src/share/vm/classfile/classLoader.hpp	Mon Aug 29 23:04:48 2016 +0400
+++ b/hotspot/src/share/vm/classfile/classLoader.hpp	Mon Aug 29 20:13:45 2016 -0400
@@ -50,12 +50,14 @@
 
 class ClassPathEntry : public CHeapObj<mtClass> {
 private:
-  ClassPathEntry* _next;
+  ClassPathEntry* volatile _next;
 public:
   // Next entry in class path
-  ClassPathEntry* next() const { return _next; }
+  ClassPathEntry* next() const {
+    return (ClassPathEntry*) OrderAccess::load_ptr_acquire(&_next);
+  }
   void set_next(ClassPathEntry* next) {
-    // may have unlocked readers, so write atomically.
+    // may have unlocked readers, so ensure visibility.
     OrderAccess::release_store_ptr(&_next, next);
   }
   virtual bool is_jrt() = 0;