< prev index next >

src/hotspot/share/runtime/mutex.cpp

Print this page

        

*** 157,183 **** // as_suspend_equivalent logically implies !no_safepoint_check guarantee(!as_suspend_equivalent || !no_safepoint_check, "invariant"); // !no_safepoint_check logically implies java_thread guarantee(no_safepoint_check || self->is_Java_thread(), "invariant"); ! #ifdef ASSERT Monitor * least = get_least_ranked_lock_besides_this(self->owned_locks()); assert(least != this, "Specification of get_least_... call above"); if (least != NULL && least->rank() <= special) { ::tty->print("Attempting to wait on monitor %s/%d while holding" " lock %s/%d -- possible deadlock", name(), rank(), least->name(), least->rank()); assert(false, "Shouldn't block(wait) while holding a lock of rank special"); } ! #endif // ASSERT ! ! #ifdef CHECK_UNHANDLED_OOPS ! // Clear unhandled oops in JavaThreads so we get a crash right away. ! if (self->is_Java_thread() && !no_safepoint_check) { ! self->clear_unhandled_oops(); ! } ! #endif // CHECK_UNHANDLED_OOPS int wait_status; // conceptually set the owner to NULL in anticipation of // abdicating the lock in wait set_owner(NULL); --- 157,176 ---- // as_suspend_equivalent logically implies !no_safepoint_check guarantee(!as_suspend_equivalent || !no_safepoint_check, "invariant"); // !no_safepoint_check logically implies java_thread guarantee(no_safepoint_check || self->is_Java_thread(), "invariant"); ! #ifdef ASSERT Monitor * least = get_least_ranked_lock_besides_this(self->owned_locks()); assert(least != this, "Specification of get_least_... call above"); if (least != NULL && least->rank() <= special) { ::tty->print("Attempting to wait on monitor %s/%d while holding" " lock %s/%d -- possible deadlock", name(), rank(), least->name(), least->rank()); assert(false, "Shouldn't block(wait) while holding a lock of rank special"); } ! #endif // ASSERT int wait_status; // conceptually set the owner to NULL in anticipation of // abdicating the lock in wait set_owner(NULL);
< prev index next >