65792bc54c8e16107ba09380d576828cc4669d02
[mono.git] / mono / utils / mono-conc-hashtable.h
1 /*
2  * mono-conc-hashtable.h: A mostly concurrent hashtable
3  *
4  * Author:
5  *      Rodrigo Kumpera (kumpera@gmail.com)
6  *
7  * (C) 2014 Xamarin
8  */
9
10 #ifndef __MONO_CONCURRENT_HASHTABLE_H__
11 #define __MONO_CONCURRENT_HASHTABLE_H__
12
13 #include <mono/utils/mono-compiler.h>
14 #include <mono/utils/mono-mutex.h>
15 #include <glib.h>
16
17 typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable;
18
19 MonoConcurrentHashTable* mono_conc_hashtable_new (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func) MONO_INTERNAL;
20 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) MONO_INTERNAL;
21 void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table) MONO_INTERNAL;
22 gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
23 gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value) MONO_INTERNAL;
24 gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key) MONO_INTERNAL;
25
26 #endif
27