Move the mono_thread_create () function into utils/mono-threads.h/c, change/simplify...
[mono.git] / mono / metadata / sgen-pinning.c
index cd7eeaa1e6df4bebc6f13476ec1155a90cbe02ee..9ada778bc7460520a599b808cd156eaaa734d48e 100644 (file)
@@ -262,10 +262,11 @@ sgen_cement_lookup (char *obj)
 }
 
 gboolean
-sgen_cement_lookup_or_register (char *obj, gboolean concurrent_cementing)
+sgen_cement_lookup_or_register (char *obj)
 {
        int i;
        CementHashEntry *hash;
+       gboolean concurrent_cementing = sgen_concurrent_collection_in_progress ();
 
        if (!cement_enabled)
                return FALSE;
@@ -305,7 +306,7 @@ sgen_cement_lookup_or_register (char *obj, gboolean concurrent_cementing)
        ++hash [i].count;
        if (hash [i].count == SGEN_CEMENT_THRESHOLD) {
                if (G_UNLIKELY (MONO_GC_OBJ_CEMENTED_ENABLED())) {
-                       MonoVTable *vt = (MonoVTable*)SGEN_LOAD_VTABLE (obj);
+                       MonoVTable *vt G_GNUC_UNUSED = (MonoVTable*)SGEN_LOAD_VTABLE (obj);
                        MONO_GC_OBJ_CEMENTED ((mword)obj, sgen_safe_object_get_size ((MonoObject*)obj),
                                        vt->klass->name_space, vt->klass->name);
                }