--- a/src/hotspot/share/runtime/basicLock.hpp Fri Aug 16 09:18:41 2019 +0200
+++ b/src/hotspot/share/runtime/basicLock.hpp Tue Aug 06 10:48:21 2019 +0200
@@ -26,16 +26,22 @@
#define SHARE_RUNTIME_BASICLOCK_HPP
#include "oops/markOop.hpp"
+#include "runtime/atomic.hpp"
#include "runtime/handles.hpp"
class BasicLock {
friend class VMStructs;
friend class JVMCIVMStructs;
private:
- volatile markOop _displaced_header;
+ volatile markWord _displaced_header;
public:
- markOop displaced_header() const { return _displaced_header; }
- void set_displaced_header(markOop header) { _displaced_header = header; }
+ markWord displaced_header() const {
+ return Atomic::load(&_displaced_header);
+ }
+
+ void set_displaced_header(markWord header) {
+ Atomic::store(header, &_displaced_header);
+ }
void print_on(outputStream* st) const;