< prev index next >

src/share/vm/oops/instanceKlass.cpp

Print this page

        

*** 433,443 **** void InstanceKlass::eager_initialize_impl() { EXCEPTION_MARK; HandleMark hm(THREAD); Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL); // abort if someone beat us to the initialization if (!is_not_initialized()) return; // note: not equivalent to is_initialized() ClassState old_state = init_state(); --- 433,443 ---- void InstanceKlass::eager_initialize_impl() { EXCEPTION_MARK; HandleMark hm(THREAD); Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL); // abort if someone beat us to the initialization if (!is_not_initialized()) return; // note: not equivalent to is_initialized() ClassState old_state = init_state();
*** 581,591 **** // verification & rewriting { HandleMark hm(THREAD); Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL); // rewritten will have been set if loader constraint error found // on an earlier link attempt // don't verify or rewrite if already rewritten // --- 581,591 ---- // verification & rewriting { HandleMark hm(THREAD); Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL); // rewritten will have been set if loader constraint error found // on an earlier link attempt // don't verify or rewrite if already rewritten //
*** 707,717 **** // refer to the JVM book page 47 for description of steps // Step 1 { Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL); Thread *self = THREAD; // it's passed the current thread // Step 2 // If we were to use wait() instead of waitInterruptibly() then --- 707,717 ---- // refer to the JVM book page 47 for description of steps // Step 1 { Handle h_init_lock(THREAD, init_lock()); ! ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL); Thread *self = THREAD; // it's passed the current thread // Step 2 // If we were to use wait() instead of waitInterruptibly() then
*** 843,859 **** } void InstanceKlass::set_initialization_state_and_notify(ClassState state, TRAPS) { Handle h_init_lock(THREAD, init_lock()); ! if (init_lock() != NULL) { ObjectLocker ol(h_init_lock, THREAD); set_init_state(state); fence_and_clear_init_lock(); ol.notify_all(CHECK); } else { ! assert(init_lock() != NULL, "The initialization state should never be set twice"); set_init_state(state); } } // The embedded _implementor field can only record one implementor. --- 843,859 ---- } void InstanceKlass::set_initialization_state_and_notify(ClassState state, TRAPS) { Handle h_init_lock(THREAD, init_lock()); ! if (h_init_lock() != NULL) { ObjectLocker ol(h_init_lock, THREAD); set_init_state(state); fence_and_clear_init_lock(); ol.notify_all(CHECK); } else { ! assert(h_init_lock() != NULL, "The initialization state should never be set twice"); set_init_state(state); } } // The embedded _implementor field can only record one implementor.
< prev index next >