< prev index next >
src/hotspot/share/runtime/objectMonitor.inline.hpp
Print this page
rev 59856 : 8247280: more fencing needed in async deflation for non-TSO machines
Reviewed-by: dholmes
rev 59857 : 8246676: monitor list lock operations need more fencing
Reviewed-by: dholmes, eosterlund, rehn
@@ -221,19 +221,30 @@
// The _next_om field can be concurrently read and modified so we
// use Atomic operations to disable compiler optimizations that
// might try to elide loading and/or storing this field.
+// Simply get _next_om field.
inline ObjectMonitor* ObjectMonitor::next_om() const {
return Atomic::load(&_next_om);
}
+// Get _next_om field with acquire semantics.
+inline ObjectMonitor* ObjectMonitor::next_om_acquire() const {
+ return Atomic::load_acquire(&_next_om);
+}
+
// Simply set _next_om field to new_value.
inline void ObjectMonitor::set_next_om(ObjectMonitor* new_value) {
Atomic::store(&_next_om, new_value);
}
+// Set _next_om field to new_value with release semantics.
+inline void ObjectMonitor::release_set_next_om(ObjectMonitor* new_value) {
+ Atomic::release_store(&_next_om, new_value);
+}
+
// Try to set _next_om field to new_value if the current value matches
// old_value. Otherwise, does not change the _next_om field. Returns
// the prior value of the _next_om field.
inline ObjectMonitor* ObjectMonitor::try_set_next_om(ObjectMonitor* old_value, ObjectMonitor* new_value) {
return Atomic::cmpxchg(&_next_om, old_value, new_value);
< prev index next >