File tree 1 file changed +2
-2
lines changed
src/hotspot/share/runtime
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -147,13 +147,13 @@ class ObjectMonitor : public CHeapObj<mtInternal> {
147
147
sizeof (WeakHandle));
148
148
// Used by async deflation as a marker in the _owner field:
149
149
#define DEFLATER_MARKER reinterpret_cast <void *>(-1 )
150
- void * _owner; // pointer to owning thread OR BasicLock
150
+ void * volatile _owner; // pointer to owning thread OR BasicLock
151
151
volatile jlong _previous_owner_tid; // thread id of the previous owner of the monitor
152
152
// Separate _owner and _next_om on different cache lines since
153
153
// both can have busy multi-threaded access. _previous_owner_tid is only
154
154
// changed by ObjectMonitor::exit() so it is a good choice to share the
155
155
// cache line with _owner.
156
- DEFINE_PAD_MINUS_SIZE (1 , OM_CACHE_LINE_SIZE, sizeof (void *) +
156
+ DEFINE_PAD_MINUS_SIZE (1 , OM_CACHE_LINE_SIZE, sizeof (void * volatile ) +
157
157
sizeof (volatile jlong));
158
158
ObjectMonitor* _next_om; // Next ObjectMonitor* linkage
159
159
volatile intx _recursions; // recursion count, 0 for first entry
You can’t perform that action at this time.
0 commit comments