< prev index next >
src/share/vm/runtime/os.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, 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.
@@ -447,11 +447,28 @@
};
static bool create_thread(Thread* thread,
ThreadType thr_type,
size_t 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);
static void initialize_thread(Thread* thr);
< prev index next >