[coop] Add missing coop checks for WFSO and WFMO.
[mono.git] / mono / metadata / mono-hash.c
index a5f3ff809ad9c4faffcc2e7c390445aebfc0fb82..11fd4641042f7b7063b19063639cd3e4f3799864 100644 (file)
@@ -68,7 +68,7 @@ struct _MonoGHashTable {
 #ifdef HAVE_SGEN_GC
 static void *table_hash_descr = NULL;
 
-static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func);
+static void mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data);
 
 static Slot*
 new_slot (MonoGHashTable *hash)
@@ -220,7 +220,7 @@ rehash (MonoGHashTable *hash)
 {
        int diff = ABS (hash->last_rehash - hash->in_use);
        RehashData data;
-       void *old_table;
+       void *old_table G_GNUC_UNUSED; /* unused on Boehm */
 
        /* These are the factors to play with to change the rehashing strategy */
        /* I played with them with a large range, and could not really get */
@@ -481,7 +481,7 @@ mono_g_hash_table_print_stats (MonoGHashTable *table)
 
 /* GC marker function */
 static void
-mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
+mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func, void *gc_data)
 {
        MonoGHashTable *table = (MonoGHashTable*)addr;
        Slot *node;
@@ -491,23 +491,23 @@ mono_g_hash_mark (void *addr, MonoGCMarkFunc mark_func)
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->key)
-                                       mark_func (&node->key);
+                                       mark_func (&node->key, gc_data);
                        }
                }
        } else if (table->gc_type == MONO_HASH_VALUE_GC) {
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->value)
-                                       mark_func (&node->value);
+                                       mark_func (&node->value, gc_data);
                        }
                }
        } else if (table->gc_type == MONO_HASH_KEY_VALUE_GC) {
                for (i = 0; i < table->table_size; i++) {
                        for (node = table->table [i]; node; node = node->next) {
                                if (node->key)
-                                       mark_func (&node->key);
+                                       mark_func (&node->key, gc_data);
                                if (node->value)
-                                       mark_func (&node->value);
+                                       mark_func (&node->value, gc_data);
                        }
                }
        }