< prev index next >

src/hotspot/os/windows/os_windows.cpp

Print this page

        

*** 3595,3622 **** return OS_OK; } void os::interrupt(Thread* thread) { 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 // to interrupted() to be visible to other threads before we post // the interrupt event. OrderAccess::release(); SetEvent(osthread->interrupt_event()); // For JSR166: unpark after setting status ! if (thread->is_Java_thread()) { ! ((JavaThread*)thread)->parker()->unpark(); ! } ParkEvent * ev = thread->_ParkEvent; if (ev != NULL) ev->unpark(); ! ev = thread->_SleepEvent; if (ev != NULL) ev->unpark(); } bool os::is_interrupted(Thread* thread, bool clear_interrupted) { --- 3595,3621 ---- return OS_OK; } void os::interrupt(Thread* thread) { debug_only(Thread::check_for_dangling_thread_pointer(thread);) ! assert(thread->is_Java_thread(), "invariant"); ! JavaThread* jt = (JavaThread*) 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 // to interrupted() to be visible to other threads before we post // the interrupt event. OrderAccess::release(); SetEvent(osthread->interrupt_event()); // For JSR166: unpark after setting status ! jt->parker()->unpark(); ParkEvent * ev = thread->_ParkEvent; if (ev != NULL) ev->unpark(); ! ev = jt->_SleepEvent; if (ev != NULL) ev->unpark(); } bool os::is_interrupted(Thread* thread, bool clear_interrupted) {
< prev index next >