< prev index next >
src/share/vm/runtime/java.cpp
Print this page
*** 509,520 ****
#undef BEFORE_EXIT_RUNNING
#undef BEFORE_EXIT_DONE
}
void vm_exit(int code) {
! Thread* thread = ThreadLocalStorage::is_initialized() ?
! ThreadLocalStorage::get_thread_slow() : NULL;
if (thread == NULL) {
// we have serious problems -- just exit
vm_direct_exit(code);
}
--- 509,519 ----
#undef BEFORE_EXIT_RUNNING
#undef BEFORE_EXIT_DONE
}
void vm_exit(int code) {
! Thread* thread = Thread::current();
if (thread == NULL) {
// we have serious problems -- just exit
vm_direct_exit(code);
}
*** 548,559 ****
void vm_perform_shutdown_actions() {
// Warning: do not call 'exit_globals()' here. All threads are still running.
// Calling 'exit_globals()' will disable thread-local-storage and cause all
// kinds of assertions to trigger in debug mode.
if (is_init_completed()) {
! Thread* thread = ThreadLocalStorage::is_initialized() ?
! ThreadLocalStorage::get_thread_slow() : NULL;
if (thread != NULL && thread->is_Java_thread()) {
// We are leaving the VM, set state to native (in case any OS exit
// handlers call back to the VM)
JavaThread* jt = (JavaThread*)thread;
// Must always be walkable or have no last_Java_frame when in
--- 547,557 ----
void vm_perform_shutdown_actions() {
// Warning: do not call 'exit_globals()' here. All threads are still running.
// Calling 'exit_globals()' will disable thread-local-storage and cause all
// kinds of assertions to trigger in debug mode.
if (is_init_completed()) {
! Thread* thread = Thread::current();
if (thread != NULL && thread->is_Java_thread()) {
// We are leaving the VM, set state to native (in case any OS exit
// handlers call back to the VM)
JavaThread* jt = (JavaThread*)thread;
// Must always be walkable or have no last_Java_frame when in
< prev index next >