src/hotspot/os/posix/os_posix.cpp
changeset 48105 8d15b1369c7a
parent 47765 b7c7428eaab9
child 48153 cfa2c43e58c2
--- a/src/hotspot/os/posix/os_posix.cpp	Wed Nov 22 14:31:48 2017 -0500
+++ b/src/hotspot/os/posix/os_posix.cpp	Wed Nov 22 17:54:50 2017 -0800
@@ -478,8 +478,7 @@
 // interrupt support
 
 void os::interrupt(Thread* thread) {
-  assert(Thread::current() == thread || Threads_lock->owned_by_self(),
-    "possibility of dangling Thread pointer");
+  debug_only(Thread::check_for_dangling_thread_pointer(thread);)
 
   OSThread* osthread = thread->osthread();
 
@@ -499,12 +498,10 @@
 
   ParkEvent * ev = thread->_ParkEvent ;
   if (ev != NULL) ev->unpark() ;
-
 }
 
 bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
-  assert(Thread::current() == thread || Threads_lock->owned_by_self(),
-    "possibility of dangling Thread pointer");
+  debug_only(Thread::check_for_dangling_thread_pointer(thread);)
 
   OSThread* osthread = thread->osthread();