NaCl runtime fixes
[mono.git] / mono / metadata / boehm-gc.c
index b9166846b744c095a2d3cf27f28f401efec51e3a..9e5ab87ac9c09e9f393f4e6f15ed39cf872a75ec 100644 (file)
@@ -74,7 +74,7 @@ mono_gc_base_init (void)
         * we used to do this only when running on valgrind,
         * but it happens also in other setups.
         */
-#if defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK)
+#if defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) && !defined(__native_client__)
        {
                size_t size;
                void *sstart;
@@ -299,26 +299,6 @@ mono_gc_get_heap_size (void)
        return GC_get_heap_size ();
 }
 
-void
-mono_gc_disable (void)
-{
-#ifdef HAVE_GC_ENABLE
-       GC_disable ();
-#else
-       g_assert_not_reached ();
-#endif
-}
-
-void
-mono_gc_enable (void)
-{
-#ifdef HAVE_GC_ENABLE
-       GC_enable ();
-#else
-       g_assert_not_reached ();
-#endif
-}
-
 gboolean
 mono_gc_is_gc_thread (void)
 {
@@ -943,7 +923,7 @@ mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
                return NULL;
        if (!SMALL_ENOUGH (klass->instance_size))
                return NULL;
-       if (mono_class_has_finalizer (klass) || klass->marshalbyref || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
+       if (mono_class_has_finalizer (klass) || mono_class_is_marshalbyref (klass) || (mono_profiler_get_events () & MONO_PROFILE_ALLOCATIONS))
                return NULL;
        if (klass->rank)
                return NULL;
@@ -969,7 +949,7 @@ mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
 }
 
 MonoMethod*
-mono_gc_get_managed_array_allocator (MonoVTable *vtable, int rank)
+mono_gc_get_managed_array_allocator (MonoClass *klass)
 {
        return NULL;
 }
@@ -1022,7 +1002,7 @@ mono_gc_get_managed_allocator (MonoVTable *vtable, gboolean for_box)
 }
 
 MonoMethod*
-mono_gc_get_managed_array_allocator (MonoVTable *vtable, int rank)
+mono_gc_get_managed_array_allocator (MonoClass *klass)
 {
        return NULL;
 }
@@ -1247,4 +1227,10 @@ mono_gc_make_root_descr_user (MonoGCRootMarkFunc marker)
        return NULL;
 }
 
+gboolean
+mono_gc_set_allow_synchronous_major (gboolean flag)
+{
+       return flag;
+}
+
 #endif /* no Boehm GC */