Skip to content

Commit

Permalink
Merge pull request #74 from pshipton/fixbranch
Browse files Browse the repository at this point in the history
Fix 0.42 to have correct M1 content
  • Loading branch information
JasonFengJ9 authored Nov 22, 2023
2 parents d2bdb14 + 63cc16e commit 0c32793
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 35 deletions.
13 changes: 3 additions & 10 deletions closed/custom/modules/java.base/Lib.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ===========================================================================
# (c) Copyright IBM Corp. 2018, 2020 All Rights Reserved
# (c) Copyright IBM Corp. 2018, 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 All @@ -18,24 +18,17 @@
# 2 along with this work; if not, see <http://www.gnu.org/licenses/>.
# ===========================================================================

################################################################################
# Create the Java Native crypto library
ifeq ($(WITH_OPENSSL), yes)
$(eval $(call SetupJdkLibrary, BUILD_JNCRYPTO, \
NAME := jncrypto, \
OPTIMIZATION := LOW, \
CFLAGS := $(CFLAGS_JDKLIB) \
-c $(OPENSSL_CFLAGS), \
CFLAGS := $(CFLAGS_JDKLIB) $(OPENSSL_CFLAGS), \
DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value, \
DISABLED_WARNINGS_clang := sign-compare, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LDFLAGS := $(LDFLAGS_JDKLIB) $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := $(LIBDL), \
))
TARGETS += $(BUILD_JNCRYPTO)
endif

INCLUDE_CUSTOM_EXTENSION_SYMBOLS := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$(LIBRARY_PREFIX)jncrypto.symbols
INCLUDE_CUSTOM_EXTENSION_LIB := BUILD_JNCRYPTO
################################################################################
45 changes: 24 additions & 21 deletions src/java.base/share/classes/java/lang/Thread.java
Original file line number Diff line number Diff line change
Expand Up @@ -1627,32 +1627,35 @@ void clearReferences() {
* a chance to clean up before it actually exits.
*/
void exit() {
/* Refresh interrupted value so it is accurate when thread reference is removed. */
interrupted = interrupted();

try {
// pop any remaining scopes from the stack, this may block
if (headStackableScopes != null) {
StackableScope.popAll();
}
} finally {
// notify container that thread is exiting
ThreadContainer container = threadContainer();
if (container != null) {
container.onExit(this);
/* Refresh interrupted value so it is accurate when thread reference is removed. */
interrupted = interrupted();

try {
// pop any remaining scopes from the stack, this may block
if (headStackableScopes != null) {
StackableScope.popAll();
}
} finally {
// notify container that thread is exiting
ThreadContainer container = threadContainer();
if (container != null) {
container.onExit(this);
}
}
}

try {
if (threadLocals != null && TerminatingThreadLocal.REGISTRY.isPresent()) {
TerminatingThreadLocal.threadTerminated();
try {
if (threadLocals != null && TerminatingThreadLocal.REGISTRY.isPresent()) {
TerminatingThreadLocal.threadTerminated();
}
} finally {
clearReferences();
}
} finally {
clearReferences();
}
synchronized (interruptLock) {
// so that isAlive() can work
eetop = Thread.NO_REF;
synchronized (interruptLock) {
// so that isAlive() can work
eetop = Thread.NO_REF;
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/java.base/share/classes/java/util/Timer.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,9 @@ private void mainLoop() {
// A zero checkpointRestoreTimeDelta value indicates no Checkpoint performed yet,
// it can't be negative, otherwise a RestoreException already was thrown.
if (checkpointRestoreTimeDelta > 0) {
// Ensure the time compensation in milliseconds is not less than the checkpoint restore time delta.
task.nextExecutionTime += (checkpointRestoreTimeDelta / 1000000);
task.nextExecutionTime += ((checkpointRestoreTimeDelta % 1000000 == 0) ? 0 : 1);
// clear the flag - only one time adjustment required
task.criuAdjustRequired = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*
* 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
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*
* 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
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*
* 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
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*
* 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
* published by the Free Software Foundation.
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Expand Down

0 comments on commit 0c32793

Please sign in to comment.