< prev index next >
src/hotspot/share/runtime/thread.cpp
Print this page
rev 54717 : imported patch 8223306
*** 1612,1622 ****
set_deferred_locals(NULL);
set_deopt_mark(NULL);
set_deopt_compiled_method(NULL);
clear_must_deopt_id();
set_monitor_chunks(NULL);
- set_next(NULL);
_on_thread_list = false;
set_thread_state(_thread_new);
_terminated = _not_terminated;
_array_for_gc = NULL;
_suspend_equivalent = false;
--- 1612,1621 ----
*** 3455,3465 ****
//
// Note: The Threads_lock is currently more widely used than we
// would like. We are actively migrating Threads_lock uses to other
// mechanisms in order to reduce Threads_lock contention.
- JavaThread* Threads::_thread_list = NULL;
int Threads::_number_of_threads = 0;
int Threads::_number_of_non_daemon_threads = 0;
int Threads::_return_code = 0;
uintx Threads::_thread_claim_token = 1; // Never zero.
size_t JavaThread::_stack_size_at_create = 0;
--- 3454,3463 ----
*** 3762,3772 ****
if (Arguments::init_agents_at_startup()) {
create_vm_init_agents();
}
// Initialize Threads state
- _thread_list = NULL;
_number_of_threads = 0;
_number_of_non_daemon_threads = 0;
// Initialize global data structures and create system classes in heap
vm_init_globals();
--- 3760,3769 ----
*** 4425,4437 ****
// The threads lock must be owned at this point
assert(Threads_lock->owned_by_self(), "must have threads lock");
BarrierSet::barrier_set()->on_thread_attach(p);
- p->set_next(_thread_list);
- _thread_list = p;
-
// Once a JavaThread is added to the Threads list, smr_delete() has
// to be used to delete it. Otherwise we can just delete it directly.
p->set_on_thread_list();
_number_of_threads++;
--- 4422,4431 ----
*** 4465,4488 ****
assert(ThreadsSMRSupport::get_java_thread_list()->includes(p), "p must be present");
// Maintain fast thread list
ThreadsSMRSupport::remove_thread(p);
- JavaThread* current = _thread_list;
- JavaThread* prev = NULL;
-
- while (current != p) {
- prev = current;
- current = current->next();
- }
-
- if (prev) {
- prev->set_next(current->next());
- } else {
- _thread_list = p->next();
- }
-
_number_of_threads--;
if (!is_daemon) {
_number_of_non_daemon_threads--;
// Only one thread left, do a notify on the Threads_lock so a thread waiting
--- 4459,4468 ----
< prev index next >