提交 18762e17 编写于 作者: L Lukasz

Add mono_unity_gc_is_disabled

Use Boehm GC_ functions in mono_unity_gc_enable/disable instead of mono_gc_ functions.
上级 372a5821
......@@ -13,7 +13,10 @@
#include <mono/metadata/threads.h>
#include <mono/metadata/tokentype.h>
#include <mono/utils/mono-string.h>
#include <mono/metadata/gc-internal.h>
#if HAVE_BOEHM_GC
#include <libgc/include/gc.h>
#endif
#include <glib.h>
......@@ -327,10 +330,28 @@ mono_unity_install_unitytls_interface(mono_unity_unitytls_interface* callbacks)
void mono_unity_gc_enable()
{
mono_gc_enable();
#if HAVE_BOEHM_GC
GC_enable ();
#else
g_assert_not_reached ();
#endif
}
void mono_unity_gc_disable()
{
mono_gc_disable();
#if HAVE_BOEHM_GC
GC_disable ();
#else
g_assert_not_reached ();
#endif
}
int mono_unity_gc_is_disabled()
{
#if HAVE_BOEHM_GC
return GC_dont_gc != 0;
#else
g_assert_not_reached ();
return 0;
#endif
}
......@@ -50,5 +50,6 @@ void mono_unity_install_unitytls_interface(mono_unity_unitytls_interface* callba
// gc
void mono_unity_gc_enable();
void mono_unity_gc_disable();
int mono_unity_gc_is_disabled();
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册