hotspot/src/share/vm/runtime/vmThread.cpp
changeset 34633 2a6c7c7b30a7
parent 33222 e0a340f4ab6e
child 35061 be6025ebffea
equal deleted inserted replaced
34632:bf3518bba285 34633:2a6c7c7b30a7
   238 }
   238 }
   239 
   239 
   240 void VMThread::run() {
   240 void VMThread::run() {
   241   assert(this == vm_thread(), "check");
   241   assert(this == vm_thread(), "check");
   242 
   242 
   243   this->initialize_thread_local_storage();
       
   244   this->initialize_named_thread();
   243   this->initialize_named_thread();
   245   this->record_stack_base_and_size();
   244   this->record_stack_base_and_size();
   246   // Notify_lock wait checks on active_handles() to rewait in
   245   // Notify_lock wait checks on active_handles() to rewait in
   247   // case of spurious wakeup, it should wait on the last
   246   // case of spurious wakeup, it should wait on the last
   248   // value set prior to the notify
   247   // value set prior to the notify
   305     // Mutex::lock_without_safepoint_check().
   304     // Mutex::lock_without_safepoint_check().
   306     MutexLockerEx ml(_terminate_lock, Mutex::_no_safepoint_check_flag);
   305     MutexLockerEx ml(_terminate_lock, Mutex::_no_safepoint_check_flag);
   307     _terminated = true;
   306     _terminated = true;
   308     _terminate_lock->notify();
   307     _terminate_lock->notify();
   309   }
   308   }
   310 
       
   311   // Thread destructor usually does this.
       
   312   ThreadLocalStorage::set_thread(NULL);
       
   313 
   309 
   314   // Deletion must be done synchronously by the JNI DestroyJavaVM thread
   310   // Deletion must be done synchronously by the JNI DestroyJavaVM thread
   315   // so that the VMThread deletion completes before the main thread frees
   311   // so that the VMThread deletion completes before the main thread frees
   316   // up the CodeHeap.
   312   // up the CodeHeap.
   317 
   313