< prev index next >

src/share/vm/oops/oopsHierarchy.hpp

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

@@ -102,18 +102,26 @@
   bool operator==(const oop o) const  { return obj() == o.obj(); }
   bool operator==(void *p) const      { return obj() == p; }
   bool operator!=(const volatile oop o) const  { return obj() != o.obj(); }
   bool operator!=(void *p) const      { return obj() != p; }
 
+  oopDesc*  operator->() const volatile       { return obj(); }
+  bool operator==(const oop o) const volatile { return obj() == o.obj(); }
+  bool operator==(void *p) const volatile     { return obj() == p; }
+  bool operator!=(const volatile oop o) const volatile { return obj() != o.obj(); }
+  bool operator!=(void *p) const volatile     { return obj() != p; }
+
   bool operator<(oop o) const         { return obj() < o.obj(); }
   bool operator>(oop o) const         { return obj() > o.obj(); }
   bool operator<=(oop o) const        { return obj() <= o.obj(); }
   bool operator>=(oop o) const        { return obj() >= o.obj(); }
   bool operator!() const              { return !obj(); }
 
   // Assignment
   oop& operator=(const oop& o)                            { _o = o.obj(); return *this; }
+  oop& operator=(void *o)                                 { _o = (oopDesc*)o; return *this; }
+  oop& operator=(const volatile oop& o)                   { _o = o.obj(); return *this; }
   volatile oop& operator=(const oop& o) volatile          { _o = o.obj(); return *this; }
   volatile oop& operator=(const volatile oop& o) volatile { _o = o.obj(); return *this; }
 
   // Explict user conversions
   operator void* () const             { return (void *)obj(); }
< prev index next >