--- old/src/share/vm/runtime/os.hpp 2018-01-24 21:13:47.810909099 -0500 +++ new/src/share/vm/runtime/os.hpp 2018-01-24 21:13:47.758909102 -0500 @@ -1,5 +1,5 @@ /* - * 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 @@ -449,7 +449,24 @@ 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);