hotspot/src/share/vm/prims/jvm.cpp
JVM_ENTRY(jobject, JVM_CurrentThread(JNIEnv* env, jclass threadClass))
{- -------------------------------------------
(1) (トレース出力) (See: JVMWrapper)
---------------------------------------- -}
JVMWrapper("JVM_CurrentThread");
{- -------------------------------------------
(1) JVM_ENTRY マクロ内で, カレントスレッドを
JavaThread::thread_from_jni_environment() で取得して
thread という変数に束縛済みなので,
それを JNI Handle 化して返すだけ.
---------------------------------------- -}
oop jthread = thread->threadObj();
assert (thread != NULL, "no current thread!");
return JNIHandles::make_local(env, jthread);
JVM_END
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.