Make the loading of llvm EH info async safe. (#4725)
[mono.git] / mono / metadata / domain-internals.h
index 10347f109004e75c4eab58ae6bcb5cb7be6a7aeb..3cfa02246127b652ccfd974b097451047642283f 100644 (file)
@@ -1,4 +1,5 @@
-/*
+/**
+ * \file
  * Appdomain-related internal data structures and functions.
  * Copyright 2012 Xamarin Inc (http://www.xamarin.com)
  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -183,12 +184,22 @@ typedef struct {
        int thunks_size;
 } MonoThunkJitInfo;
 
+typedef struct {
+       guint8 *unw_info;
+       int unw_info_len;
+} MonoUnwindJitInfo;
+
 typedef enum {
        JIT_INFO_NONE = 0,
        JIT_INFO_HAS_GENERIC_JIT_INFO = (1 << 0),
        JIT_INFO_HAS_TRY_BLOCK_HOLES = (1 << 1),
        JIT_INFO_HAS_ARCH_EH_INFO = (1 << 2),
-       JIT_INFO_HAS_THUNK_INFO = (1 << 3)
+       JIT_INFO_HAS_THUNK_INFO = (1 << 3),
+       /*
+        * If this is set, the unwind info is stored in the structure, instead of being pointed to by the
+        * 'unwind_info' field.
+        */
+       JIT_INFO_HAS_UNWIND_INFO = (1 << 4)
 } MonoJitInfoFlags;
 
 struct _MonoJitInfo {
@@ -216,6 +227,7 @@ struct _MonoJitInfo {
        gboolean    has_try_block_holes:1;
        gboolean    has_arch_eh_info:1;
        gboolean    has_thunk_info:1;
+       gboolean    has_unwind_info:1;
        gboolean    from_aot:1;
        gboolean    from_llvm:1;
        gboolean    dbg_attrs_inited:1;
@@ -535,6 +547,9 @@ mono_jit_info_get_arch_eh_info (MonoJitInfo *ji);
 MonoThunkJitInfo*
 mono_jit_info_get_thunk_info (MonoJitInfo *ji);
 
+MonoUnwindJitInfo*
+mono_jit_info_get_unwind_info (MonoJitInfo *ji);
+
 /* 
  * Installs a new function which is used to return a MonoJitInfo for a method inside
  * an AOT module.