src/hotspot/share/runtime/os.hpp
changeset 48005 9fd89aabb6cd
parent 47903 7f22774a5f42
child 48153 cfa2c43e58c2
--- a/src/hotspot/share/runtime/os.hpp	Mon Nov 20 09:46:55 2017 +0000
+++ b/src/hotspot/share/runtime/os.hpp	Mon Nov 20 15:56:32 2017 -0500
@@ -454,7 +454,24 @@
   static bool create_thread(Thread* thread,
                             ThreadType thr_type,
                             size_t req_stack_size = 0);
+
+  // The "main thread", also known as "starting thread", is the thread
+  // that loads/creates the JVM via JNI_CreateJavaVM.
   static bool create_main_thread(JavaThread* thread);
+
+  // The primordial thread is the initial process thread. The java
+  // launcher never uses the primordial thread as the main thread, but
+  // applications that host the JVM directly may do so. Some platforms
+  // need special-case handling of the primordial thread if it attaches
+  // to the VM.
+  static bool is_primordial_thread(void)
+#if defined(_WINDOWS) || defined(BSD)
+    // No way to identify the primordial thread.
+    { return false; }
+#else
+  ;
+#endif
+
   static bool create_attached_thread(JavaThread* thread);
   static void pd_start_thread(Thread* thread);
   static void start_thread(Thread* thread);