src/share/vm/runtime/java.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 





  25 // Register function to be called by before_exit
  26 extern "C" { void register_on_exit_function(void (*func)(void)) ;}
  27 
  28 // Execute code before all handles are released and thread is killed; prologue to vm_exit
  29 extern void before_exit(JavaThread * thread);
  30 
  31 // Forced VM exit (i.e, internal error or JVM_Exit)
  32 extern void vm_exit(int code);
  33 
  34 // Wrapper for ::exit()
  35 extern void vm_direct_exit(int code);
  36 
  37 // Shutdown the VM but do not exit the process
  38 extern void vm_shutdown();
  39 // Shutdown the VM and abort the process
  40 extern void vm_abort(bool dump_core=true);
  41 
  42 // Trigger any necessary notification of the VM being shutdown
  43 extern void notify_vm_shutdown();
  44 


 191   static bool is_gte_jdk13x_version() {
 192     return current().compare_major(3) >= 0;
 193   }
 194 
 195   static bool is_gte_jdk14x_version() {
 196     return current().compare_major(4) >= 0;
 197   }
 198 
 199   static bool is_gte_jdk15x_version() {
 200     return current().compare_major(5) >= 0;
 201   }
 202 
 203   static bool is_gte_jdk16x_version() {
 204     return current().compare_major(6) >= 0;
 205   }
 206 
 207   static bool is_gte_jdk17x_version() {
 208     return current().compare_major(7) >= 0;
 209   }
 210 };


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_RUNTIME_JAVA_HPP
  26 #define SHARE_VM_RUNTIME_JAVA_HPP
  27 
  28 #include "runtime/os.hpp"
  29 
  30 // Register function to be called by before_exit
  31 extern "C" { void register_on_exit_function(void (*func)(void)) ;}
  32 
  33 // Execute code before all handles are released and thread is killed; prologue to vm_exit
  34 extern void before_exit(JavaThread * thread);
  35 
  36 // Forced VM exit (i.e, internal error or JVM_Exit)
  37 extern void vm_exit(int code);
  38 
  39 // Wrapper for ::exit()
  40 extern void vm_direct_exit(int code);
  41 
  42 // Shutdown the VM but do not exit the process
  43 extern void vm_shutdown();
  44 // Shutdown the VM and abort the process
  45 extern void vm_abort(bool dump_core=true);
  46 
  47 // Trigger any necessary notification of the VM being shutdown
  48 extern void notify_vm_shutdown();
  49 


 196   static bool is_gte_jdk13x_version() {
 197     return current().compare_major(3) >= 0;
 198   }
 199 
 200   static bool is_gte_jdk14x_version() {
 201     return current().compare_major(4) >= 0;
 202   }
 203 
 204   static bool is_gte_jdk15x_version() {
 205     return current().compare_major(5) >= 0;
 206   }
 207 
 208   static bool is_gte_jdk16x_version() {
 209     return current().compare_major(6) >= 0;
 210   }
 211 
 212   static bool is_gte_jdk17x_version() {
 213     return current().compare_major(7) >= 0;
 214   }
 215 };
 216 
 217 #endif // SHARE_VM_RUNTIME_JAVA_HPP