equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
33 JNIEXPORT void JNICALL |
33 JNIEXPORT void JNICALL |
34 Java_java_lang_Shutdown_halt0(JNIEnv *env, jclass ignored, jint code) |
34 Java_java_lang_Shutdown_halt0(JNIEnv *env, jclass ignored, jint code) |
35 { |
35 { |
36 JVM_Halt(code); |
36 JVM_Halt(code); |
37 } |
37 } |
38 |
|
39 |
|
40 JNIEXPORT void JNICALL |
|
41 Java_java_lang_Shutdown_runAllFinalizers(JNIEnv *env, jclass ignored) |
|
42 { |
|
43 jclass cl; |
|
44 jmethodID mid; |
|
45 |
|
46 if ((cl = (*env)->FindClass(env, "java/lang/ref/Finalizer")) |
|
47 && (mid = (*env)->GetStaticMethodID(env, cl, |
|
48 "runAllFinalizers", "()V"))) { |
|
49 (*env)->CallStaticVoidMethod(env, cl, mid); |
|
50 } |
|
51 } |
|