src/share/vm/runtime/java.cpp

Print this page

        

*** 428,439 **** exit_procs = entry; } } } - jint volatile vm_getting_terminated = 0; - // Note: before_exit() can be executed only once, if more than one threads // are trying to shutdown the VM at the same time, only one thread // can run before_exit() and all other threads must wait. void before_exit(JavaThread * thread) { #define BEFORE_EXIT_NOT_RUN 0 --- 428,437 ----
*** 460,471 **** case BEFORE_EXIT_DONE: return; } } - OrderAccess::release_store(&vm_getting_terminated, 1); - // The only difference between this and Win32's _onexit procs is that // this version is invoked before any threads get killed. ExitProc* current = exit_procs; while (current != NULL) { ExitProc* next = current->next(); --- 458,467 ----
*** 585,595 **** } void vm_direct_exit(int code) { notify_vm_shutdown(); os::wait_for_keypress_at_exit(); ! ::exit(code); } 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 --- 581,591 ---- } void vm_direct_exit(int code) { notify_vm_shutdown(); os::wait_for_keypress_at_exit(); ! os::exit(code); } 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