8074561: Wrong volatile qualifier for field ClassLoaderDataGraphKlassIteratorAtomic::_next_klass
authorasiebenborn
Fri, 06 Mar 2015 16:47:46 +0100
changeset 29469 2213171cca5b
parent 29468 fb61ea6af339
child 29471 8db7e3b9922b
8074561: Wrong volatile qualifier for field ClassLoaderDataGraphKlassIteratorAtomic::_next_klass Reviewed-by: mgerdin, stefank
hotspot/src/share/vm/classfile/classLoaderData.cpp
hotspot/src/share/vm/classfile/classLoaderData.hpp
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp	Mon Mar 09 08:22:34 2015 +0100
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp	Fri Mar 06 16:47:46 2015 +0100
@@ -902,7 +902,7 @@
 }
 
 Klass* ClassLoaderDataGraphKlassIteratorAtomic::next_klass() {
-  Klass* head = (Klass*)_next_klass;
+  Klass* head = _next_klass;
 
   while (head != NULL) {
     Klass* next = next_klass_in_cldg(head);
--- a/hotspot/src/share/vm/classfile/classLoaderData.hpp	Mon Mar 09 08:22:34 2015 +0100
+++ b/hotspot/src/share/vm/classfile/classLoaderData.hpp	Fri Mar 06 16:47:46 2015 +0100
@@ -315,7 +315,7 @@
 
 // An iterator that distributes Klasses to parallel worker threads.
 class ClassLoaderDataGraphKlassIteratorAtomic : public StackObj {
-  volatile Klass* _next_klass;
+ Klass* volatile _next_klass;
  public:
   ClassLoaderDataGraphKlassIteratorAtomic();
   Klass* next_klass();