37 class OopClosure;
38 class Thread;
39 class ThreadClosure;
40 class ThreadsList;
41 class outputStream;
42
43 // The active thread queue. It also keeps track of the current used
44 // thread priorities.
45 class Threads: AllStatic {
46 friend class VMStructs;
47 private:
48 static int _number_of_threads;
49 static int _number_of_non_daemon_threads;
50 static int _return_code;
51 static uintx _thread_claim_token;
52 #ifdef ASSERT
53 static bool _vm_complete;
54 #endif
55
56 static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
57 static void initialize_jsr292_core_classes(TRAPS);
58
59 public:
60 // Thread management
61 // force_daemon is a concession to JNI, where we may need to add a
62 // thread to the thread list before allocating its thread object
63 static void add(JavaThread* p, bool force_daemon = false);
64 static void remove(JavaThread* p, bool is_daemon);
65 static void non_java_threads_do(ThreadClosure* tc);
66 static void java_threads_do(ThreadClosure* tc);
67 static void threads_do(ThreadClosure* tc);
68 static void possibly_parallel_threads_do(bool is_par, ThreadClosure* tc);
69
70 // Initializes the vm and creates the vm thread
71 static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
72 static void convert_vm_init_libraries_to_agents();
73 static void create_vm_init_libraries();
74 static void create_vm_init_agents();
75 static void shutdown_vm_agents();
76 static void destroy_vm();
|
37 class OopClosure;
38 class Thread;
39 class ThreadClosure;
40 class ThreadsList;
41 class outputStream;
42
43 // The active thread queue. It also keeps track of the current used
44 // thread priorities.
45 class Threads: AllStatic {
46 friend class VMStructs;
47 private:
48 static int _number_of_threads;
49 static int _number_of_non_daemon_threads;
50 static int _return_code;
51 static uintx _thread_claim_token;
52 #ifdef ASSERT
53 static bool _vm_complete;
54 #endif
55
56 static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
57 static bool initialize_compilation(TRAPS);
58 static void initialize_jsr292_core_classes(TRAPS);
59
60 public:
61 // Thread management
62 // force_daemon is a concession to JNI, where we may need to add a
63 // thread to the thread list before allocating its thread object
64 static void add(JavaThread* p, bool force_daemon = false);
65 static void remove(JavaThread* p, bool is_daemon);
66 static void non_java_threads_do(ThreadClosure* tc);
67 static void java_threads_do(ThreadClosure* tc);
68 static void threads_do(ThreadClosure* tc);
69 static void possibly_parallel_threads_do(bool is_par, ThreadClosure* tc);
70
71 // Initializes the vm and creates the vm thread
72 static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
73 static void convert_vm_init_libraries_to_agents();
74 static void create_vm_init_libraries();
75 static void create_vm_init_agents();
76 static void shutdown_vm_agents();
77 static void destroy_vm();
|