Skip to content

Commit

Permalink
Merge pull request ibmruntimes#3 from keithc-ca/cherry
Browse files Browse the repository at this point in the history
Cherry-pick missing changes from jdknext
  • Loading branch information
JasonFengJ9 authored Jan 5, 2023
2 parents 65627c6 + 8a48e4f commit 8da95bb
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 6 deletions.
3 changes: 2 additions & 1 deletion closed/OpenJ9.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
Expand Down Expand Up @@ -325,6 +325,7 @@ OPENJ9_VERSION_VARS := \
OPENJDK_TARGET_CPU_OSARCH \
OPENJDK_TARGET_OS \
PRODUCT_NAME \
PRODUCT_SUFFIX \
USERNAME \
VERSION_STRING \
#
Expand Down
12 changes: 10 additions & 2 deletions closed/autoconf/custom-hook.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved
# (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
# ===========================================================================
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
Expand Down Expand Up @@ -348,7 +348,15 @@ AC_DEFUN([OPENJ9_CONFIGURE_CRIU_SUPPORT],
elif test "x$enable_criu_support" = xno ; then
AC_MSG_RESULT([no (explicitly disabled)])
elif test "x$enable_criu_support" = x ; then
AC_MSG_RESULT([no (default)])
case "$OPENJ9_PLATFORM_CODE" in
xa64)
AC_MSG_RESULT([yes (default)])
OPENJ9_ENABLE_CRIU_SUPPORT=true
;;
*)
AC_MSG_RESULT([no (default)])
;;
esac
else
AC_MSG_ERROR([--enable-criu-support accepts no argument])
fi
Expand Down
4 changes: 2 additions & 2 deletions closed/openj9_version_info.h.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* ===========================================================================
* (c) Copyright IBM Corp. 2017, 2020 All Rights Reserved
* (c) Copyright IBM Corp. 2017, 2023 All Rights Reserved
* ===========================================================================
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,7 +25,7 @@
#define OPENJ9_VERSION_INFO_H

#define J9COMPILER_VERSION_STRING "@COMPILER_VERSION_STRING@"
#define J9PRODUCT_NAME "@PRODUCT_NAME@"
#define J9PRODUCT_NAME "@PRODUCT_NAME@ @PRODUCT_SUFFIX@"
#define J9TARGET_CPU_BITS "@OPENJDK_TARGET_CPU_BITS@"
#define J9TARGET_CPU_OSARCH "@OPENJDK_TARGET_CPU_OSARCH@"
#define J9TARGET_OS "@OPENJDK_TARGET_OS@"
Expand Down
11 changes: 10 additions & 1 deletion src/java.base/share/classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

/*
* ===========================================================================
* (c) Copyright IBM Corp. 2021, 2022 All Rights Reserved
* (c) Copyright IBM Corp. 2021, 2023 All Rights Reserved
* ===========================================================================
*/

Expand Down Expand Up @@ -1744,6 +1744,10 @@ public static boolean interrupted() {
* @revised 6.0, 14
*/
public boolean isInterrupted() {
// use fully qualified name to avoid ambiguous class error
if (com.ibm.oti.vm.VM.isJVMInSingleThreadedMode()) {
return isInterruptedImpl();
}
return interrupted;
}

Expand All @@ -1764,6 +1768,10 @@ final void clearInterrupt() {
}

boolean getAndClearInterrupt() {
// use fully qualified name to avoid ambiguous class error
if (com.ibm.oti.vm.VM.isJVMInSingleThreadedMode()) {
return interruptedImpl();
}
synchronized (interruptLock) {
boolean oldValue = interrupted;
if (oldValue) {
Expand Down Expand Up @@ -3064,6 +3072,7 @@ private void setNativeName(String name) {
private native void setPriorityNoVMAccessImpl(long eetop, int priority);
private native void interruptImpl();
private static native boolean interruptedImpl();
private native boolean isInterruptedImpl();
private native void setNameImpl(long threadRef, String threadName);
private native int getStateImpl(long eetop);

Expand Down

0 comments on commit 8da95bb

Please sign in to comment.