hotspot/src/share/vm/gc/shared/concurrentGCThread.cpp
changeset 34633 2a6c7c7b30a7
parent 33608 7afc768e4d62
child 36082 e734f3a55bdf
equal deleted inserted replaced
34632:bf3518bba285 34633:2a6c7c7b30a7
    49   }
    49   }
    50 }
    50 }
    51 
    51 
    52 void ConcurrentGCThread::initialize_in_thread() {
    52 void ConcurrentGCThread::initialize_in_thread() {
    53   this->record_stack_base_and_size();
    53   this->record_stack_base_and_size();
    54   this->initialize_thread_local_storage();
       
    55   this->initialize_named_thread();
    54   this->initialize_named_thread();
    56   this->set_active_handles(JNIHandleBlock::allocate_block());
    55   this->set_active_handles(JNIHandleBlock::allocate_block());
    57   // From this time Thread::current() should be working.
    56   // From this time Thread::current() should be working.
    58   assert(this == Thread::current(), "just checking");
    57   assert(this == Thread::current(), "just checking");
    59 }
    58 }
    72     MutexLockerEx mu(Terminator_lock,
    71     MutexLockerEx mu(Terminator_lock,
    73                      Mutex::_no_safepoint_check_flag);
    72                      Mutex::_no_safepoint_check_flag);
    74     _has_terminated = true;
    73     _has_terminated = true;
    75     Terminator_lock->notify();
    74     Terminator_lock->notify();
    76   }
    75   }
    77 
       
    78   // Thread destructor usually does this..
       
    79   ThreadLocalStorage::set_thread(NULL);
       
    80 }
    76 }
    81 
    77 
    82 static void _sltLoop(JavaThread* thread, TRAPS) {
    78 static void _sltLoop(JavaThread* thread, TRAPS) {
    83   SurrogateLockerThread* slt = (SurrogateLockerThread*)thread;
    79   SurrogateLockerThread* slt = (SurrogateLockerThread*)thread;
    84   slt->loop();
    80   slt->loop();