mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8057744: (process) Synchronize exiting of threads and process [win]
Reviewed-by: dholmes, dcubed, sla
This commit is contained in:
parent
3ad47cdbeb
commit
497f5c44a6
9 changed files with 112 additions and 30 deletions
|
@ -430,8 +430,6 @@ extern "C" {
|
|||
}
|
||||
}
|
||||
|
||||
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.
|
||||
|
@ -462,8 +460,6 @@ void before_exit(JavaThread * thread) {
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -587,7 +583,7 @@ void notify_vm_shutdown() {
|
|||
void vm_direct_exit(int code) {
|
||||
notify_vm_shutdown();
|
||||
os::wait_for_keypress_at_exit();
|
||||
::exit(code);
|
||||
os::exit(code);
|
||||
}
|
||||
|
||||
void vm_perform_shutdown_actions() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue