MCPcopy Create free account
hub / github.com/async-profiler/async-profiler / osThreadId

Method osThreadId

src/vmStructs.cpp:642–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

640}
641
642int VMThread::osThreadId() {
643 const char* osthread = *(const char**) at(_thread_osthread_offset);
644 if (osthread != NULL) {
645 // Java thread may be in the middle of termination, and its osthread structure just released
646 return SafeAccess::load32((int32_t*)(osthread + _osthread_id_offset), -1);
647 }
648 return -1;
649}
650
651JNIEnv* VMThread::jni() {
652 if (_env_offset < 0) {

Callers 1

nativeThreadIdMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected