-
-struct _MonoDomain {
- MonoAppDomain *domain;
- CRITICAL_SECTION lock;
- MonoMemPool *mp;
- MonoCodeManager *code_mp;
- MonoGHashTable *env;
- GHashTable *assemblies;
- MonoAssembly *entry_assembly;
- MonoAppDomainSetup *setup;
- char *friendly_name;
- guint32 state;
- MonoGHashTable *ldstr_table;
- MonoGHashTable *class_vtable_hash;
- MonoGHashTable *proxy_vtable_hash;
- MonoGHashTable *static_data_hash;
- GHashTable *jit_code_hash;
- MonoJitInfoTable *jit_info_table;
- /* hashtables for Reflection handles */
- MonoGHashTable *type_hash;
- MonoGHashTable *refobject_hash;
- /* Needed by Thread:GetDomainID() */
- gint32 domain_id;
- /* Used when loading assemblies */
- gchar **search_path;
- /* Used by remoting proxies */
- MonoMethod *create_proxy_for_type_method;
- MonoMethod *private_invoke_method;
- MonoAppContext *default_context;
- MonoException *out_of_memory_ex;
- MonoException *null_reference_ex;
- MonoException *stack_overflow_ex;
- /* Used to store offsets of thread and context static fields */
- GHashTable *special_static_fields;
- GHashTable *jump_target_hash;
- MonoGHashTable *class_init_trampoline_hash;
- /*
- * This must be a GHashTable, since these objects can't be finalized
- * if the hashtable contains a GC visible reference to them.
- */
- GHashTable *finalizable_objects_hash;
-};
-
-/* This is a copy of System.AppDomain */
-struct _MonoAppDomain {
- MonoMarshalByRefObject mbr;
- MonoDomain *data;
-};
-
-extern MonoDomain *mono_root_domain;
-
-extern HANDLE mono_delegate_semaphore;
-extern CRITICAL_SECTION mono_delegate_section;
-
-#define mono_domain_lock(domain) EnterCriticalSection(&(domain)->lock)
-#define mono_domain_unlock(domain) LeaveCriticalSection(&(domain)->lock)