2 * runtime.c: Runtime functions
7 * Copyright 2010 Novell, Inc (http://www.novell.com)
14 #include <mono/metadata/appdomain.h>
15 #include <mono/metadata/class.h>
16 #include <mono/metadata/class-internals.h>
17 #include <mono/metadata/runtime.h>
18 #include <mono/metadata/monitor.h>
21 fire_process_exit_event (MonoDomain
*domain
, gpointer user_data
)
23 MonoClassField
*field
;
25 MonoObject
*delegate
, *exc
;
27 field
= mono_class_get_field_from_name (mono_defaults
.appdomain_class
, "ProcessExit");
30 delegate
= *(MonoObject
**)(((char *)domain
->domain
) + field
->offset
);
36 mono_runtime_delegate_invoke (delegate
, pa
, &exc
);
40 mono_runtime_shutdown (void)
42 mono_domain_foreach (fire_process_exit_event
, NULL
);
47 mono_runtime_is_critical_method (MonoMethod
*method
)
49 if (mono_monitor_is_il_fastpath_wrapper (method
))