< prev index next >

src/hotspot/share/runtime/thread.cpp

Print this page
rev 52112 : [mq]: 8021335

@@ -1928,10 +1928,11 @@
       // external suspend request and will be able to mark ourselves as
       // exiting.
     }
     // no more external suspends are allowed at this point
   } else {
+    assert(!is_terminated() && !is_exiting(), "must not be exiting");
     // before_exit() has already posted JVMTI THREAD_END events
   }
 
   if (log_is_enabled(Debug, os, thread, timer)) {
     _timer_exit_phase1.stop();

@@ -4330,11 +4331,11 @@
 }
 
 
 void Threads::add(JavaThread* p, bool force_daemon) {
   // The threads lock must be owned at this point
-  assert_locked_or_safepoint(Threads_lock);
+  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;
< prev index next >