Skip to content

Commit

Permalink
Merge pull request #18663 from JasonFengJ9/vtdisablesuspend
Browse files Browse the repository at this point in the history
JDK next adds JVM_VirtualThreadDisableSuspend
  • Loading branch information
pshipton authored Dec 20, 2023
2 parents 0001f68 + af66952 commit 005be12
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/j9vm/exports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ endif()
if(NOT JAVA_SPEC_VERSION LESS 22)
jvm_add_exports(jvm
JVM_ExpandStackFrameInfo
JVM_VirtualThreadDisableSuspend
)
endif()

Expand Down
1 change: 1 addition & 0 deletions runtime/j9vm/j9vmnatives.xml
Original file line number Diff line number Diff line change
Expand Up @@ -450,5 +450,6 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<exports group="jdk22">
<!-- Additions for Java 22 (General) -->
<export name="JVM_ExpandStackFrameInfo"/>
<export name="JVM_VirtualThreadDisableSuspend"/>
</exports>
</exportlists>
6 changes: 6 additions & 0 deletions runtime/j9vm/javanextvmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,12 @@ JVM_ExpandStackFrameInfo(JNIEnv *env, jobject object)
{
assert(!"JVM_ExpandStackFrameInfo unimplemented");
}

JNIEXPORT void JNICALL
JVM_VirtualThreadDisableSuspend(JNIEnv *env, jobject vthread, jboolean enter)
{
assert(!"JVM_VirtualThreadDisableSuspend unimplemented");
}
#endif /* JAVA_SPEC_VERSION >= 22 */

} /* extern "C" */
2 changes: 2 additions & 0 deletions runtime/redirector/forwarders.m4
Original file line number Diff line number Diff line change
Expand Up @@ -429,3 +429,5 @@ _IF([defined(J9VM_OPT_VALHALLA_VALUE_TYPES)],
[_X(JVM_IsValhallaEnabled, JNICALL, false, jboolean, void)])
_IF([JAVA_SPEC_VERSION >= 22],
[_X(JVM_ExpandStackFrameInfo, JNICALL, false, void, JNIEnv *env, jobject object)])
_IF([JAVA_SPEC_VERSION >= 22],
[_X(JVM_VirtualThreadDisableSuspend, JNICALL, false, void, JNIEnv *env, jobject vthread, jboolean enter)])

0 comments on commit 005be12

Please sign in to comment.