Change bootstrap profile to target 4.0 framework. Bump system mono requirement to...
[mono.git] / mono / metadata / null-gc.c
index 6115ec14eb902fea470f103c218b6a2ecfb8ca5b..54b2ddbeea4f055e77ca4ca7aabb144ae799247e 100644 (file)
@@ -13,6 +13,7 @@
 #include <mono/metadata/runtime.h>
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-threads.h>
+#include <mono/utils/mono-counters.h>
 
 #ifdef HAVE_NULL_GC
 
@@ -20,13 +21,21 @@ void
 mono_gc_base_init (void)
 {
        MonoThreadInfoCallbacks cb;
+       int dummy;
+
+       mono_counters_init ();
 
        memset (&cb, 0, sizeof (cb));
-       cb.mono_method_is_critical = mono_runtime_is_critical_method;
+       /* TODO: This casts away an incompatible pointer type warning in the same
+                manner that boehm-gc does it. This is probably worth investigating
+                more carefully. */
+       cb.mono_method_is_critical = (gpointer)mono_runtime_is_critical_method;
        cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
        cb.thread_exit = mono_gc_pthread_exit;
 
        mono_threads_init (&cb, sizeof (MonoThreadInfo));
+
+       mono_thread_info_attach (&dummy);
 }
 
 void
@@ -379,7 +388,7 @@ mono_gc_conservatively_scan_area (void *start, void *end)
 }
 
 void *
-mono_gc_scan_object (void *obj)
+mono_gc_scan_object (void *obj, void *gc_data)
 {
        g_assert_not_reached ();
        return NULL;