< prev index next >

src/os/solaris/vm/os_solaris.cpp

Print this page

        

@@ -1219,17 +1219,13 @@
 
 // Free Solaris resources related to the OSThread
 void os::free_thread(OSThread* osthread) {
   assert(osthread != NULL, "os::free_thread but osthread not set");
 
+  // Usually osthread will be the current thread, but during VM termination
+  // it might be the VMThread or (what was) the WatcherThread
 
-  // We are told to free resources of the argument thread,
-  // but we can only really operate on the current thread.
-  // The main thread must take the VMThread down synchronously
-  // before the main thread exits and frees up CodeHeap
-  guarantee((Thread::current()->osthread() == osthread
-             || (osthread == VMThread::vm_thread()->osthread())), "os::free_thread but not current thread");
   if (Thread::current()->osthread() == osthread) {
     // Restore caller's signal mask
     sigset_t sigmask = osthread->caller_sigmask();
     pthread_sigmask(SIG_SETMASK, &sigmask, NULL);
   }
< prev index next >