@@ -755,8 +755,8 @@ acquireExclusiveVMAccessFromExternalThread(J9JavaVM * vm)
755
755
UDATA vmResponsesExpected = 0 ;
756
756
UDATA jniResponsesExpected = 0 ;
757
757
758
- /* If safepoiont exclusive has already been acquired, nothing need be done here */
759
- if (J9_XACCESS_EXCLUSIVE == vm->safePointState ) {
758
+ /* If exclusive has already been acquired, nothing need be done here */
759
+ if (vm->alreadyHaveExclusive ) {
760
760
return ;
761
761
}
762
762
@@ -842,8 +842,8 @@ releaseExclusiveVMAccessFromExternalThread(J9JavaVM * vm)
842
842
{
843
843
J9VMThread * currentThread;
844
844
845
- /* If safepoiont exclusive has already been acquired, nothing need be done here */
846
- if (J9_XACCESS_EXCLUSIVE == vm->safePointState ) {
845
+ /* If exclusive has already been acquired, nothing need be done here */
846
+ if (vm->alreadyHaveExclusive ) {
847
847
return ;
848
848
}
849
849
@@ -924,8 +924,8 @@ requestExclusiveVMAccessMetronomeTemp(J9JavaVM *vm, UDATA block, UDATA *vmRespon
924
924
UDATA jniResponsesExpected = 0 ;
925
925
*gcPriority = J9THREAD_PRIORITY_MAX;
926
926
927
- /* If safepoiont exclusive has already been acquired, nothing need be done here */
928
- if (J9_XACCESS_EXCLUSIVE == vm->safePointState ) {
927
+ /* If exclusive has already been acquired, nothing need be done here */
928
+ if (vm->alreadyHaveExclusive ) {
929
929
return TRUE ;
930
930
}
931
931
@@ -1028,22 +1028,24 @@ waitForExclusiveVMAccessMetronomeTemp(J9VMThread * vmThread, UDATA vmResponsesRe
1028
1028
{
1029
1029
J9JavaVM *vm = vmThread->javaVM ;
1030
1030
1031
- /* No need to wait if we already have safepoint exclusive */
1032
- if (J9_XACCESS_EXCLUSIVE != vm->safePointState ) {
1033
- waitForResponseFromExternalThread (vmThread->javaVM , vmResponsesRequired, jniResponsesRequired);
1031
+ /* If exclusive has already been acquired, nothing need be done here */
1032
+ if (vm->alreadyHaveExclusive ) {
1033
+ return ;
1034
+ }
1034
1035
1035
- VM_VMAccess::backOffFromSafePoint (vmThread);
1036
-
1037
- /* Do not wait on JAVA_SUSPEND, since we are not real JAVA thread.
1038
- * This patch was needed for some debug scenarios with JVMTI, that would result in a deadlock otherwise.
1039
- * TODO: re-examine with latest JDWP
1040
- */
1041
- internalAcquireVMAccessNoMutexWithMask (vmThread, J9_PUBLIC_FLAGS_HALT_THREAD_ANY_NO_JAVA_SUSPEND);
1036
+ waitForResponseFromExternalThread (vmThread->javaVM , vmResponsesRequired, jniResponsesRequired);
1042
1037
1043
- Assert_VM_true (vmThread-> omrVMThread -> exclusiveCount == 0 );
1038
+ VM_VMAccess::backOffFromSafePoint (vmThread);
1044
1039
1045
- ++(vmThread->omrVMThread ->exclusiveCount );
1046
- }
1040
+ /* Do not wait on JAVA_SUSPEND, since we are not real JAVA thread.
1041
+ * This patch was needed for some debug scenarios with JVMTI, that would result in a deadlock otherwise.
1042
+ * TODO: re-examine with latest JDWP
1043
+ */
1044
+ internalAcquireVMAccessNoMutexWithMask (vmThread, J9_PUBLIC_FLAGS_HALT_THREAD_ANY_NO_JAVA_SUSPEND);
1045
+
1046
+ Assert_VM_true (vmThread->omrVMThread ->exclusiveCount ==0 );
1047
+
1048
+ ++(vmThread->omrVMThread ->exclusiveCount );
1047
1049
}
1048
1050
1049
1051
void
0 commit comments