< prev index next >

src/share/vm/oops/instanceRefKlass.cpp

Print this page

        

*** 89,99 **** } } bool InstanceRefKlass::owns_pending_list_lock(JavaThread* thread) { if (java_lang_ref_Reference::pending_list_lock() == NULL) return false; ! Handle h_lock(thread, java_lang_ref_Reference::pending_list_lock()); return ObjectSynchronizer::current_thread_holds_lock(thread, h_lock); } void InstanceRefKlass::acquire_pending_list_lock(BasicLock *pending_list_basic_lock) { // we may enter this with pending exception set --- 89,99 ---- } } bool InstanceRefKlass::owns_pending_list_lock(JavaThread* thread) { if (java_lang_ref_Reference::pending_list_lock() == NULL) return false; ! Handle h_lock(thread, oopDesc::bs()->write_barrier(java_lang_ref_Reference::pending_list_lock())); return ObjectSynchronizer::current_thread_holds_lock(thread, h_lock); } void InstanceRefKlass::acquire_pending_list_lock(BasicLock *pending_list_basic_lock) { // we may enter this with pending exception set
*** 102,112 **** // Create a HandleMark in case we retry a GC multiple times. // Each time we attempt the GC, we allocate the handle below // to hold the pending list lock. We want to free this handle. HandleMark hm; ! Handle h_lock(THREAD, java_lang_ref_Reference::pending_list_lock()); ObjectSynchronizer::fast_enter(h_lock, pending_list_basic_lock, false, THREAD); assert(ObjectSynchronizer::current_thread_holds_lock( JavaThread::current(), h_lock), "Locking should have succeeded"); if (HAS_PENDING_EXCEPTION) CLEAR_PENDING_EXCEPTION; --- 102,112 ---- // Create a HandleMark in case we retry a GC multiple times. // Each time we attempt the GC, we allocate the handle below // to hold the pending list lock. We want to free this handle. HandleMark hm; ! Handle h_lock(THREAD, oopDesc::bs()->write_barrier(java_lang_ref_Reference::pending_list_lock())); ObjectSynchronizer::fast_enter(h_lock, pending_list_basic_lock, false, THREAD); assert(ObjectSynchronizer::current_thread_holds_lock( JavaThread::current(), h_lock), "Locking should have succeeded"); if (HAS_PENDING_EXCEPTION) CLEAR_PENDING_EXCEPTION;
*** 120,130 **** // Create a HandleMark in case we retry a GC multiple times. // Each time we attempt the GC, we allocate the handle below // to hold the pending list lock. We want to free this handle. HandleMark hm; ! Handle h_lock(THREAD, java_lang_ref_Reference::pending_list_lock()); assert(ObjectSynchronizer::current_thread_holds_lock( JavaThread::current(), h_lock), "Lock should be held"); // Notify waiters on pending lists lock if there is any reference. if (java_lang_ref_Reference::pending_list() != NULL) { --- 120,130 ---- // Create a HandleMark in case we retry a GC multiple times. // Each time we attempt the GC, we allocate the handle below // to hold the pending list lock. We want to free this handle. HandleMark hm; ! Handle h_lock(THREAD, oopDesc::bs()->write_barrier(java_lang_ref_Reference::pending_list_lock())); assert(ObjectSynchronizer::current_thread_holds_lock( JavaThread::current(), h_lock), "Lock should be held"); // Notify waiters on pending lists lock if there is any reference. if (java_lang_ref_Reference::pending_list() != NULL) {
< prev index next >