[utils] Export concurrent hash table and lock free queue functions.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 8 May 2015 10:53:31 +0000 (12:53 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 8 May 2015 10:56:20 +0000 (12:56 +0200)
mono/utils/lock-free-queue.h
mono/utils/mono-conc-hashtable.h

index 2dd4948b78e2be75c5b140c7348a214f9a5f42de..6ae52471e5b4967467b88eb319fabf67944216f9 100644 (file)
@@ -29,6 +29,7 @@
 #define __MONO_LOCKFREEQUEUE_H__
 
 #include <glib.h>
+#include <mono/utils/mono-publib.h>
 
 //#define QUEUE_DEBUG  1
 
@@ -55,13 +56,13 @@ typedef struct {
        volatile gint32 has_dummy;
 } MonoLockFreeQueue;
 
-void mono_lock_free_queue_init (MonoLockFreeQueue *q);
+MONO_API void mono_lock_free_queue_init (MonoLockFreeQueue *q);
 
-void mono_lock_free_queue_node_init (MonoLockFreeQueueNode *node, gboolean to_be_freed);
-void mono_lock_free_queue_node_free (MonoLockFreeQueueNode *node);
+MONO_API void mono_lock_free_queue_node_init (MonoLockFreeQueueNode *node, gboolean to_be_freed);
+MONO_API void mono_lock_free_queue_node_free (MonoLockFreeQueueNode *node);
 
-void mono_lock_free_queue_enqueue (MonoLockFreeQueue *q, MonoLockFreeQueueNode *node);
+MONO_API void mono_lock_free_queue_enqueue (MonoLockFreeQueue *q, MonoLockFreeQueueNode *node);
 
-MonoLockFreeQueueNode* mono_lock_free_queue_dequeue (MonoLockFreeQueue *q);
+MONO_API MonoLockFreeQueueNode* mono_lock_free_queue_dequeue (MonoLockFreeQueue *q);
 
 #endif
index 6a90ff0fbd641848e895e2889a3b796d005064c3..e6094b7e32c2dc7372a839da346750a57e710b33 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 <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 (mono_mutex_t *mutex, GHashFunc hash_func, GEqualFunc key_equal_func);
+MONO_API 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_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);
 
 #endif