hotspot/src/share/vm/runtime/java.cpp
changeset 26295 6a9d9192f215
parent 25946 1572c9f03fb9
child 26682 f339669ba825
--- a/hotspot/src/share/vm/runtime/java.cpp	Thu Aug 21 01:43:27 2014 +0000
+++ b/hotspot/src/share/vm/runtime/java.cpp	Thu Aug 21 16:32:36 2014 -0700
@@ -430,6 +430,8 @@
   }
 }
 
+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.
@@ -460,6 +462,8 @@
     }
   }
 
+  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;