src/hotspot/share/oops/oop.hpp
Print this page
@@ -28,10 +28,11 @@
#include "gc/shared/specialized_oop_closures.hpp"
#include "memory/iterator.hpp"
#include "memory/memRegion.hpp"
#include "oops/access.hpp"
#include "oops/metadata.hpp"
+#include "runtime/atomic.hpp"
#include "utilities/macros.hpp"
// oopDesc is the top baseclass for objects classes. The {name}Desc classes describe
// the format of Java objects so the fields can be accessed from C++.
// oopDesc is abstract.
@@ -70,11 +71,11 @@
inline void set_mark(volatile markOop m);
inline void set_mark_raw(volatile markOop m);
inline void release_set_mark(markOop m);
inline markOop cas_set_mark(markOop new_mark, markOop old_mark);
- inline markOop cas_set_mark_raw(markOop new_mark, markOop old_mark);
+ inline markOop cas_set_mark_raw(markOop new_mark, markOop old_mark, atomic_memory_order order = memory_order_conservative);
// Used only to re-initialize the mark word (e.g., of promoted
// objects during a GC) -- requires a valid klass pointer
inline void init_mark();
inline void init_mark_raw();
@@ -255,11 +256,11 @@
// Forward pointer operations for scavenge
inline bool is_forwarded() const;
inline void forward_to(oop p);
- inline bool cas_forward_to(oop p, markOop compare);
+ inline bool cas_forward_to(oop p, markOop compare, atomic_memory_order order = memory_order_conservative);
// Like "forward_to", but inserts the forwarding pointer atomically.
// Exactly one thread succeeds in inserting the forwarding pointer, and
// this call returns "NULL" for that thread; any other thread has the
// value of the forwarding pointer returned and does not modify "this".