[mono-threads] Assert that we do not try to signal the handle multiple times
[mono.git] / mono / utils / mono-conc-hashtable.h
index 6a90ff0fbd641848e895e2889a3b796d005064c3..a8eb927fb35e7161fc4ee2d46efa7c6166465a76 100644 (file)
 #ifndef __MONO_CONCURRENT_HASHTABLE_H__
 #define __MONO_CONCURRENT_HASHTABLE_H__
 
+#include <mono/utils/mono-publib.h>
 #include <mono/utils/mono-compiler.h>
-#include <mono/utils/mono-mutex.h>
+#include <mono/utils/mono-os-mutex.h>
 #include <glib.h>
 
 typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable;
 
-MonoConcurrentHashTable* mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func);
-MonoConcurrentHashTable* mono_conc_hashtable_new_full (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func);
-void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table);
-gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key);
-gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value);
-gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key);
+MONO_API MonoConcurrentHashTable* mono_conc_hashtable_new (GHashFunc hash_func, GEqualFunc key_equal_func);
+MONO_API MonoConcurrentHashTable* mono_conc_hashtable_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func);
+MONO_API void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table);
+MONO_API gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key);
+MONO_API gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value);
+MONO_API gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key);
+MONO_API void mono_conc_hashtable_foreach (MonoConcurrentHashTable *hashtable, GHFunc func, gpointer userdata);
 
-#endif
 
+#endif