< prev index next >
src/hotspot/os/windows/os_windows.cpp
Print this page
rev 47794 : Port 09.17.Thread_SMR_logging_update from JDK9 to JDK10
@@ -3466,13 +3466,11 @@
// Hint to the underlying OS that a task switch would not be good.
// Void return because it's a hint and can fail.
void os::hint_no_preempt() {}
void os::interrupt(Thread* thread) {
- assert(!thread->is_Java_thread() || 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();
osthread->set_interrupted(true);
// More than one thread can get here with the same value of osthread,
// resulting in multiple notifications. We do, however, want the store
@@ -3489,12 +3487,11 @@
if (ev != NULL) ev->unpark();
}
bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
- assert(!thread->is_Java_thread() || 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();
// There is no synchronization between the setting of the interrupt
// and it being cleared here. It is critical - see 6535709 - that
// we only clear the interrupt state, and reset the interrupt event,
< prev index next >