static ProfilerDesc *prof_list = NULL;
-#define mono_profiler_coverage_lock() mono_mutex_lock (&profiler_coverage_mutex)
-#define mono_profiler_coverage_unlock() mono_mutex_unlock (&profiler_coverage_mutex)
+#define mono_profiler_coverage_lock() mono_os_mutex_lock (&profiler_coverage_mutex)
+#define mono_profiler_coverage_unlock() mono_os_mutex_unlock (&profiler_coverage_mutex)
static mono_mutex_t profiler_coverage_mutex;
/* this is directly accessible to other mono libs.
{
ProfilerDesc *desc = g_new0 (ProfilerDesc, 1);
if (!prof_list)
- mono_mutex_init_recursive (&profiler_coverage_mutex);
+ mono_os_mutex_init_recursive (&profiler_coverage_mutex);
desc->profiler = prof;
desc->shutdown_callback = callback;
desc->next = prof_list;
mono_profiler_set_events (MonoProfileFlags events)
{
ProfilerDesc *prof;
- MonoProfileFlags value = 0;
+ MonoProfileFlags value = (MonoProfileFlags)0;
if (prof_list)
prof_list->events = events;
for (prof = prof_list; prof; prof = prof->next)
- value |= prof->events;
+ value = (MonoProfileFlags)(value | prof->events);
mono_profiler_events = value;
}
prof->shutdown_callback (prof->profiler);
}
- mono_profiler_set_events (0);
+ mono_profiler_set_events ((MonoProfileFlags)0);
}
void
if (!coverage_hash)
coverage_hash = g_hash_table_new (NULL, NULL);
- res = g_malloc0 (sizeof (MonoProfileCoverageInfo) + sizeof (void*) * 2 * entries);
+ res = (MonoProfileCoverageInfo *)g_malloc0 (sizeof (MonoProfileCoverageInfo) + sizeof (void*) * 2 * entries);
res->entries = entries;
return;
}
- info = g_hash_table_lookup (coverage_hash, method);
+ info = (MonoProfileCoverageInfo *)g_hash_table_lookup (coverage_hash, method);
if (info) {
g_free (info);
g_hash_table_remove (coverage_hash, method);
mono_profiler_coverage_lock ();
if (coverage_hash)
- info = g_hash_table_lookup (coverage_hash, method);
+ info = (MonoProfileCoverageInfo *)g_hash_table_lookup (coverage_hash, method);
mono_profiler_coverage_unlock ();
if (!info)
gboolean res = FALSE;
if (col != NULL) {
- mname = g_memdup (desc, col - desc + 1);
+ mname = (char *)g_memdup (desc, col - desc + 1);
mname [col - desc] = 0;
} else {
mname = g_strdup (desc);