@@ -1207,14 +1207,11 @@ class INTERPRETER_CLASS
12071207 enterObjectMonitor (REGISTER_ARGS_LIST , j9object_t obj)
12081208 {
12091209 UDATA rc = (UDATA )obj;
1210- #if JAVA_SPEC_VERSION >= 24
1211- bool pinningSupportEnabled = J9_ARE_ANY_BITS_SET (_vm->extendedRuntimeFlags3 , J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION );
1212- #endif /* JAVA_SPEC_VERSION >= 24 */
12131210 if (!VM_ObjectMonitor::inlineFastObjectMonitorEnter (_currentThread, obj)) {
12141211 rc = objectMonitorEnterNonBlocking (_currentThread, obj);
12151212 if (J9_OBJECT_MONITOR_BLOCKING == rc) {
12161213#if JAVA_SPEC_VERSION >= 24
1217- if (pinningSupportEnabled && VM_ContinuationHelpers::isYieldableVirtualThread (_currentThread)) {
1214+ if (_pinningSupportEnabled && VM_ContinuationHelpers::isYieldableVirtualThread (_currentThread)) {
12181215 /* Try to yield the virtual thread if it will be blocked. */
12191216 updateVMStruct (REGISTER_ARGS );
12201217 rc = preparePinnedVirtualThreadForUnmount (_currentThread, obj, false );
@@ -1228,7 +1225,7 @@ class INTERPRETER_CLASS
12281225 }
12291226 }
12301227#if JAVA_SPEC_VERSION >= 24
1231- if (pinningSupportEnabled && (rc == (UDATA )obj)) {
1228+ if (_pinningSupportEnabled && (rc == (UDATA )obj)) {
12321229 J9VMContinuation *continuation = _currentThread->currentContinuation ;
12331230 if (NULL != continuation) {
12341231 if (J9_ARE_ALL_BITS_SET (continuation->runtimeFlags , J9VM_CONTINUATION_RUNTIMEFLAG_JVMTI_CONTENDED_MONITOR_ENTER_RECORDED )) {
@@ -3044,7 +3041,7 @@ class INTERPRETER_CLASS
30443041 {
30453042 if (VM_ObjectMonitor::getMonitorForNotify (_currentThread, receiver, &monitorPtr, true )) {
30463043#if JAVA_SPEC_VERSION >= 24
3047- if (J9_ARE_ANY_BITS_SET (_vm-> extendedRuntimeFlags3 , J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION )) {
3044+ if (J9VM_ARE_PINNED_YIELDABLE_VIRTUALTHREADS_ACTIVE (_vm)) {
30483045 j9objectmonitor_t lock = 0 ;
30493046 j9objectmonitor_t *lockEA = NULL ;
30503047 J9ObjectMonitor *objectMonitor = NULL ;
@@ -6004,7 +6001,7 @@ class INTERPRETER_CLASS
60046001 buildInternalNativeStackFrame (REGISTER_ARGS );
60056002 updateVMStruct (REGISTER_ARGS );
60066003#if JAVA_SPEC_VERSION >= 24
6007- if (J9_ARE_ANY_BITS_SET (_vm-> extendedRuntimeFlags3 , J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION )
6004+ if (_pinningSupportEnabled )
60086005 && (_currentThread->ownedMonitorCount > 0 )
60096006 && !isFinished
60106007 ) {
@@ -10395,7 +10392,9 @@ class INTERPRETER_CLASS
1039510392#if defined(LOCAL_LITERALS)
1039610393 J9Method *_literals = vmThread->literals ;
1039710394#endif
10398-
10395+ #if JAVA_SPEC_VERSION >= 24
10396+ const bool _pinningSupportEnabled = J9_ARE_ANY_BITS_SET (vmThread->javaVM ->extendedRuntimeFlags3 , J9_EXTENDED_RUNTIME3_YIELD_PINNED_CONTINUATION
10397+ #endif /* JAVA_SPEC_VERSION >= 24 */
1039910398 DEBUG_MUST_HAVE_VM_ACCESS (vmThread);
1040010399 vmThread->jitStackFrameFlags = 0 ;
1040110400
0 commit comments