< prev index next >

src/java.base/share/native/libjava/VirtualThread.c

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * 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.  Oracle designates this

@@ -36,11 +36,19 @@
      { "notifyJvmtiEnd",            "()V",  (void *)&JVM_VirtualThreadEnd },
      { "notifyJvmtiMount",          "(Z)V", (void *)&JVM_VirtualThreadMount },
      { "notifyJvmtiUnmount",        "(Z)V", (void *)&JVM_VirtualThreadUnmount },
      { "notifyJvmtiHideFrames",     "(Z)V", (void *)&JVM_VirtualThreadHideFrames },
      { "notifyJvmtiDisableSuspend", "(Z)V", (void *)&JVM_VirtualThreadDisableSuspend },
+     { "takeVirtualThreadListToUnblock", "()" VIRTUAL_THREAD, (void *)&JVM_TakeVirtualThreadListToUnblock},
  };
  
  JNIEXPORT void JNICALL
  Java_java_lang_VirtualThread_registerNatives(JNIEnv *env, jclass clazz) {
      (*env)->RegisterNatives(env, clazz, methods, (sizeof(methods)/sizeof(methods[0])));
  }
+ 
+ JNIEXPORT void JNICALL
+ Java_java_lang_VirtualThread_virtualThreadPinnedEvent(JNIEnv *env, jclass ignored,
+                                                       jint reasonCode, jstring reasonString)
+ {
+     JVM_VirtualThreadPinnedEvent(reasonCode, reasonString);
+ }
< prev index next >