while ((node = mono_lock_free_queue_dequeue (queue))) {
count++;
- mono_lock_free_queue_node_free (node);
+ mono_thread_hazardous_try_free (node, free);
}
return count;
dump_buffer (prof, entry->buffer);
- free (entry);
+ mono_thread_hazardous_try_free (entry, free);
return TRUE;
}
writer_thread (void *arg)
{
MonoProfiler *prof = (MonoProfiler *)arg;
- WriterQueueEntry *entry;
mono_threads_attach_tools_thread ();
mono_thread_info_set_name (mono_native_thread_id_get (), "Profiler writer");
#include <glib.h>
#include <mono/utils/mono-compiler.h>
#include <mono/utils/mono-membar.h>
+#include <mono/utils/mono-publib.h>
#define HAZARD_POINTER_COUNT 3
HAZARD_FREE_ASYNC_CTX,
} HazardFreeContext;
-gboolean mono_thread_hazardous_try_free (gpointer p, MonoHazardousFreeFunc free_func);
+MONO_API gboolean mono_thread_hazardous_try_free (gpointer p, MonoHazardousFreeFunc free_func);
void mono_thread_hazardous_queue_free (gpointer p, MonoHazardousFreeFunc free_func);
void mono_thread_hazardous_try_free_all (void);