3
#include "org_xmlvm_runtime_FinalizerNotifier.h"
6
//XMLVM_BEGIN_NATIVE_IMPLEMENTATION
7
//XMLVM_END_NATIVE_IMPLEMENTATION
9
void org_xmlvm_runtime_FinalizerNotifier_preventGarbageCollection___boolean(JAVA_BOOLEAN n1)
11
//XMLVM_BEGIN_NATIVE[org_xmlvm_runtime_FinalizerNotifier_preventGarbageCollection___boolean]
14
// Disable garbage collection. Even GC_gcollect calls will be ineffective.
17
// Reenable garbage collection. GC_disable() and GC_enable() calls
18
// nest. Garbage collection is enabled if the number of calls to both
19
// functions is equal.
26
JAVA_BOOLEAN org_xmlvm_runtime_FinalizerNotifier_currentThreadIsFinalizerThread___java_lang_Thread(JAVA_OBJECT n1)
28
//XMLVM_BEGIN_NATIVE[org_xmlvm_runtime_FinalizerNotifier_currentThreadIsFinalizerThread___java_lang_Thread]
30
// Determine if the current thread is the finalizer thread (the 1st
33
// This method is native since any methods added to proxy classes are not
34
// visible to this class, such as Thread.getCurrentThreadNativeId().
36
// return Thread.getCurrentThreadNativeId() == finalizerThread.getNativeThreadId();
37
return java_lang_Thread_getCurrentThreadNativeId__() == java_lang_Thread_getNativeThreadId__(n1);
42
JAVA_BOOLEAN org_xmlvm_runtime_FinalizerNotifier_shouldInvokeFinalizers__()
44
//XMLVM_BEGIN_NATIVE[org_xmlvm_runtime_FinalizerNotifier_shouldInvokeFinalizers__]
46
return GC_should_invoke_finalizers();
53
JAVA_INT org_xmlvm_runtime_FinalizerNotifier_invokeFinalizers__()
55
//XMLVM_BEGIN_NATIVE[org_xmlvm_runtime_FinalizerNotifier_invokeFinalizers__]
57
return GC_invoke_finalizers();