Avoid duplicates in the SSC xrefs.
[mono.git] / mono / metadata / null-gc.c
index d323b9b54b0578aae654a2c85798c737e8d8b11a..8e2c52eadcb0bdc5438fa3d4bce671dc6dbb5919 100644 (file)
@@ -2,19 +2,26 @@
  * null-gc.c: GC implementation using malloc: will leak everything, just for testing.
  *
  * Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
- * Copyright 2004-2009 Novell, Inc (http://www.novell.com)
+ * Copyright 2004-2011 Novell, Inc (http://www.novell.com)
+ * Copyright 2011 Xamarin, Inc (http://www.xamarin.com)
  */
 
 #include "config.h"
 #include <glib.h>
 #include <mono/metadata/mono-gc.h>
 #include <mono/metadata/gc-internal.h>
+#include <mono/metadata/runtime.h>
 
 #ifdef HAVE_NULL_GC
 
 void
 mono_gc_base_init (void)
 {
+       MonoThreadInfoCallbacks cb;
+
+       memset (&cb, 0, sizeof (cb));
+       cb.mono_method_is_critical = mono_runtime_is_critical_method;
+       cb.mono_gc_pthread_create = (gpointer)mono_gc_pthread_create;
 }
 
 void
@@ -376,7 +383,7 @@ mono_gc_set_gc_callbacks (MonoGCCallbacks *callbacks)
 int
 mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg)
 {
-       return mono_threads_pthread_create (new_thread, attr, start_routine, arg);
+       return pthread_create (new_thread, attr, start_routine, arg);
 }
 
 int
@@ -391,6 +398,12 @@ mono_gc_pthread_detach (pthread_t thread)
        return pthread_detach (thread);
 }
 
+void
+mono_gc_pthread_exit (void *retval)
+{
+       pthread_exit (retval);
+}
+
 #endif
 
 #ifdef HOST_WIN32