#include <mono/metadata/mono-config.h>
#include <mono/metadata/threads-types.h>
#include <mono/metadata/runtime.h>
+#include <mono/metadata/w32mutex.h>
+#include <mono/metadata/w32semaphore.h>
+#include <mono/metadata/w32event.h>
#include <metadata/threads.h>
#include <metadata/profiler-private.h>
#include <mono/metadata/coree.h>
if (domain)
g_assert_not_reached ();
-#ifdef HOST_WIN32
+#if defined(HOST_WIN32) && G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT)
/* Avoid system error message boxes. */
SetErrorMode (SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
#endif
#ifndef HOST_WIN32
mono_w32handle_init ();
+ mono_w32handle_namespace_init ();
wapi_init ();
#endif
+ mono_w32mutex_init ();
+ mono_w32semaphore_init ();
+ mono_w32event_init ();
+
#ifndef DISABLE_PERFCOUNTERS
mono_perfcounters_init ();
#endif
/* Have to do this quite late so that we at least have System.Object */
MonoError custom_attr_error;
- if (mono_assembly_get_reference_assembly_attribute (ass, &custom_attr_error)) {
+ if (mono_assembly_has_reference_assembly_attribute (ass, &custom_attr_error)) {
char *corlib_file = g_build_filename (mono_assembly_getrootdir (), "mono", current_runtime->framework_version, "mscorlib.dll", NULL);
g_print ("Could not load file or assembly %s. Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.", corlib_file);
g_free (corlib_file);
g_slist_free (domain->domain_assemblies);
domain->domain_assemblies = NULL;
+ /*
+ * Send this after the assemblies have been unloaded and the domain is still in a
+ * usable state.
+ */
+ mono_profiler_appdomain_event (domain, MONO_PROFILE_END_UNLOAD);
+
if (free_domain_hook)
free_domain_hook (domain);
g_hash_table_destroy (domain->generic_virtual_cases);
domain->generic_virtual_cases = NULL;
}
- if (domain->generic_virtual_thunks) {
- g_hash_table_destroy (domain->generic_virtual_thunks);
- domain->generic_virtual_thunks = NULL;
- }
if (domain->ftnptrs_hash) {
g_hash_table_destroy (domain->ftnptrs_hash);
domain->ftnptrs_hash = NULL;