├── headers
└── mono
│ ├── metadata
│ ├── pal-ios.h
│ ├── null-gc-handles.h
│ ├── marshal-ilgen.h
│ ├── mono-config-internals.h
│ ├── sgen-mono-ilgen.h
│ ├── w32file-internals.h
│ ├── attach.h
│ ├── mono-config-dirs.h
│ ├── icalls.h
│ ├── w32file-win32-internals.h
│ ├── environment.h
│ ├── mono-hash-internals.h
│ ├── w32semaphore.h
│ ├── appdomain-icalls.h
│ ├── runtime.h
│ ├── marshal-windows-internals.h
│ ├── console-win32-internals.h
│ ├── sgen-mono.h
│ ├── rand.h
│ ├── icall-windows-internals.h
│ ├── console-io.h
│ ├── method-builder-internals.h
│ ├── string-icalls.h
│ ├── object-forward.h
│ ├── w32handle-namespace.h
│ ├── property-bag.h
│ ├── threadpool-io.h
│ ├── security.h
│ ├── w32mutex.h
│ ├── sgen-toggleref.h
│ ├── number-ms.h
│ ├── external-only.h
│ ├── mono-perfcounters.h
│ ├── class-abi-details.h
│ ├── threadpool-worker.h
│ ├── dynamic-stream-internals.h
│ ├── filewatcher.h
│ ├── threadpool.h
│ ├── image-internals.h
│ ├── method-builder-ilgen-internals.h
│ ├── mono-conc-hash.h
│ ├── mono-basic-block.h
│ ├── w32event.h
│ ├── fdhandle.h
│ ├── marshal-internals.h
│ ├── callspec.h
│ ├── remoting.h
│ ├── mono-security-windows-internals.h
│ ├── mempool.h
│ ├── coree-internals.h
│ ├── mono-config.h
│ ├── wrapper-types.h
│ ├── mono-mlist.h
│ ├── debug-mono-ppdb.h
│ ├── mono-endian.h
│ ├── coree.h
│ ├── tokentype.h
│ ├── cominterop-win32-internals.h
│ ├── method-builder.h
│ ├── file-mmap.h
│ ├── custom-attrs-internals.h
│ ├── w32process-unix-internals.h
│ ├── lock-tracer.h
│ ├── dynamic-image-internals.h
│ ├── verify.h
│ ├── opcodes.h
│ ├── loaded-images-internals.h
│ ├── locales.h
│ ├── w32process-internals.h
│ └── mono-hash.h
│ ├── version.txt
│ ├── utils
│ ├── jemalloc
│ │ ├── .gitignore
│ │ ├── SUBMODULES.json
│ │ └── Makefile.am
│ ├── mono-utils-debug.h
│ ├── mono-forward.h
│ ├── mono-uri.h
│ ├── mono-hwcap-sparc.h
│ ├── mono-stdlib.h
│ ├── strenc-internals.h
│ ├── mono-proclib-windows-internals.h
│ ├── mono-dl-windows-internals.h
│ ├── parse.h
│ ├── mono-path.h
│ ├── mono-once.h
│ ├── mono-mmap-windows-internals.h
│ ├── mono-embed.h
│ ├── bsearch.h
│ ├── mono-errno.h
│ ├── mono-string.h
│ ├── mono-forward-internal.h
│ ├── ward.h
│ ├── mono-rand.h
│ ├── mono-mmap-internals.h
│ ├── strenc.h
│ ├── mono-experiments.h
│ ├── memfuncs.h
│ ├── mono-logger.h
│ ├── mono-networkinterfaces.h
│ ├── mono-jemalloc.h
│ ├── mono-property-hash.h
│ ├── mono-threads-debug.h
│ ├── mono-poll.h
│ ├── json.h
│ ├── mono-io-portability.h
│ ├── os-event.h
│ ├── mono-conc-hashtable.h
│ ├── mono-dl-fallback.h
│ ├── mono-coop-semaphore.h
│ ├── mach-support.h
│ ├── mono-utility-thread.h
│ ├── gc_wrapper.h
│ ├── lock-free-array-queue.h
│ ├── mono-experiments.def
│ ├── w32api.h
│ ├── mono-os-wait.h
│ ├── mono-merp.h
│ ├── mono-time.h
│ ├── mono-machine.h
│ ├── mono-value-hash.h
│ ├── mono-dl.h
│ ├── mono-codeman.h
│ ├── mono-complex.h
│ └── mono-hwcap.h
│ ├── signal.h
│ ├── dis
│ ├── dis-cil.h
│ ├── meta.h
│ ├── util.h
│ ├── declsec.h
│ └── dump.h
│ ├── config.h
│ ├── eglib-config.h
│ ├── eglib
│ ├── gmodule-win32-internals.h
│ └── gmodule.h
│ ├── vita.h
│ ├── native
│ ├── pal_config.h
│ ├── pal-android.h
│ ├── pal-icalls.h
│ └── mono-native-platform.h
│ ├── profiler
│ ├── helper.h
│ └── aot.h
│ ├── zlib
│ └── inffast.h
│ ├── mini
│ ├── lldb.h
│ ├── llvm-runtime.h
│ ├── trace.h
│ ├── THIRD-PARTY-NOTICES.TXT
│ ├── mini-windows.h
│ ├── tasklets.h
│ ├── mini-gc.h
│ ├── tiered.h
│ ├── mini-arch.h
│ ├── seq-points.h
│ ├── interp
│ │ └── interp.h
│ ├── regalloc.h
│ ├── dwarfwriter.h
│ ├── llvm-jit.h
│ ├── mini-amd64-gsharedvt.h
│ ├── cfgdump.h
│ ├── aot-compiler.h
│ ├── debugger-agent.h
│ ├── debugger-state-machine.h
│ ├── mini-llvm.h
│ └── optflags-def.h
│ ├── sgen
│ ├── sgen-major-copy-object.h
│ ├── sgen-pointer-queue.h
│ ├── sgen-tagged-pointer.h
│ ├── sgen-archdep.h
│ └── sgen-layout-stats.h
│ └── btls
│ ├── btls-key.h
│ ├── btls-error.h
│ ├── btls-x509-revoked.h
│ ├── btls-x509-lookup-mono.h
│ ├── btls-x509-chain.h
│ ├── btls-pkcs12.h
│ ├── btls-x509-store.h
│ ├── btls-x509-crl.h
│ ├── btls-bio.h
│ ├── btls-util.h
│ └── btls-x509-lookup.h
├── VMLVita2D
├── VMLVita2D.h
├── VMLVita2D.vcxproj.user
├── VMLVita2D.vcxproj.filters
├── main.c
└── Vita2D.cs
├── VitaMonoLoader
├── VMLCoreAssemblies.h
├── VitaMonoLoader.vcxproj.user
├── VML.h
└── VitaMonoLoader.vcxproj.filters
├── VML_Sample1
├── VML_Sample1.vcxproj.user
├── Sample1.cs
└── VML_Sample1.vcxproj.filters
├── VML_Sample2
├── VML_Sample2.vcxproj.user
├── Sample2.cs
└── VML_Sample2.vcxproj.filters
├── vitasdk_compat
└── VitaMonoLoader.yml
├── .gitignore
└── README.md
/headers/mono/metadata/pal-ios.h:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/headers/mono/version.txt:
--------------------------------------------------------------------------------
1 | 6.12.0.181
--------------------------------------------------------------------------------
/headers/mono/utils/jemalloc/.gitignore:
--------------------------------------------------------------------------------
1 | /Makefile
2 | /Makefile.in
3 | /jemalloc
4 |
--------------------------------------------------------------------------------
/headers/mono/signal.h:
--------------------------------------------------------------------------------
1 | #ifndef __MONO_FAKE_SIGNAL_H__
2 | #define __MONO_FAKE_SIGNAL_H__
3 |
4 | #endif
--------------------------------------------------------------------------------
/VMLVita2D/VMLVita2D.h:
--------------------------------------------------------------------------------
1 | #ifndef _VML_VITA2D_H_
2 | #define _VML_VITA2D_H_
3 |
4 | void VMLVita2DRegister();
5 |
6 | #endif
--------------------------------------------------------------------------------
/headers/mono/dis/dis-cil.h:
--------------------------------------------------------------------------------
1 | void disassemble_cil (MonoImage *m, MonoMethodHeader *mh, MonoGenericContainer *container);
2 |
--------------------------------------------------------------------------------
/VitaMonoLoader/VMLCoreAssemblies.h:
--------------------------------------------------------------------------------
1 | #ifndef _VML_CORE_ASSEMBLIES_H_
2 | #define _VML_CORE_ASSEMBLIES_H_
3 |
4 | void VMLCoreAssembliesRegister();
5 |
6 | #endif
--------------------------------------------------------------------------------
/VMLVita2D/VMLVita2D.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/VML_Sample1/VML_Sample1.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/VML_Sample2/VML_Sample2.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/VML_Sample1/Sample1.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.CompilerServices;
3 |
4 | public class Program
5 | {
6 | public static int Main()
7 | {
8 | return 123;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/VitaMonoLoader/VitaMonoLoader.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/headers/mono/metadata/null-gc-handles.h:
--------------------------------------------------------------------------------
1 | #ifndef __METADATA_NULL_GC_HANDLES_H__
2 | #define __METADATA_NULL_GC_HANDLES_H__
3 |
4 | void
5 | null_gc_handles_init (void);
6 |
7 | #endif /* __METADATA_NULL_GC_HANDLES_H__ */
8 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-utils-debug.h:
--------------------------------------------------------------------------------
1 | /* mono-utils-debug.h
2 | *
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 |
7 | gboolean
8 | mono_is_usermode_native_debugger_present (void);
9 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-forward.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * (C) 2018 Microsoft, Inc.
5 | *
6 | */
7 | #ifndef _MONO_UTILS_FORWARD_
8 | #define _MONO_UTILS_FORWARD_
9 |
10 | typedef struct _MonoDomain MonoDomain;
11 | typedef struct _MonoJitInfo MonoJitInfo;
12 |
13 | #endif
14 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-uri.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_URI_H
6 | #define __MONO_URI_H
7 | #include
8 | #include
9 |
10 | MONO_API gchar * mono_escape_uri_string (const gchar *string);
11 |
12 | #endif /* __MONO_URI_H */
13 |
14 |
--------------------------------------------------------------------------------
/headers/mono/config.h:
--------------------------------------------------------------------------------
1 | #ifndef __MONO_CONFIG_H__
2 | #define __MONO_CONFIG_H__
3 |
4 | #define TARGET_ARM
5 | #define ARM_FPU_VFP_HARD
6 |
7 | #define HANDLE SceUID
8 | #define BOOL int
9 | #define SEMAPHORE_ALL_ACCESS 0
10 |
11 | #define pid_t SceUID
12 | #define siginfo_t int
13 |
14 | #endif
--------------------------------------------------------------------------------
/headers/mono/utils/mono-hwcap-sparc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_HWCAP_SPARC_H__
6 | #define __MONO_UTILS_HWCAP_SPARC_H__
7 |
8 | #include "mono/utils/mono-hwcap.h"
9 |
10 | extern gboolean mono_hwcap_sparc_is_v9;
11 |
12 | #endif /* __MONO_UTILS_HWCAP_SPARC_H__ */
13 |
--------------------------------------------------------------------------------
/vitasdk_compat/VitaMonoLoader.yml:
--------------------------------------------------------------------------------
1 | modules:
2 | VitaMonoLoader:
3 | nid: 0
4 | libraries:
5 | VitaMonoLoader:
6 | nid: 0x8A67DAA7
7 | functions:
8 | VMLInitialize: 0x238EA12F
9 | VMLRegisterAssembly: 0x5AEA7231
10 | VMLRunMain: 0x7A91557D
11 |
--------------------------------------------------------------------------------
/headers/mono/dis/meta.h:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 |
9 |
--------------------------------------------------------------------------------
/headers/mono/eglib-config.h:
--------------------------------------------------------------------------------
1 | #ifndef __MONO_EGLIB_CONFIG_H__
2 | #define __MONO_EGLIB_CONFIG_H__
3 |
4 | #include
5 |
6 | #define G_GNUC_NORETURN
7 | #define G_GNUC_UNUSED
8 | typedef size_t gsize;
9 | typedef int32_t gssize;
10 | typedef int32_t GPid;
11 | typedef int32_t clockid_t;
12 |
13 | #endif
--------------------------------------------------------------------------------
/headers/mono/utils/mono-stdlib.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_FILE_H
6 | #define __MONO_FILE_H
7 |
8 | #ifdef HAVE_MKSTEMP
9 | #include
10 | #define mono_mkstemp(a) mkstemp(a)
11 | #else
12 | int mono_mkstemp (char *templ);
13 | #endif
14 |
15 | #endif /* __MONO_FILE_H */
16 |
17 |
--------------------------------------------------------------------------------
/headers/mono/utils/strenc-internals.h:
--------------------------------------------------------------------------------
1 | #ifndef _MONO_STRENC_INTERNALS_H_
2 | #define _MONO_STRENC_INTERNALS_H_
3 |
4 | #include
5 | #include
6 |
7 | gchar *mono_unicode_to_external_checked (const gunichar2 *uni, MonoError *err);
8 |
9 | #endif /* _MONO_STRENC_INTERNALS_H_ */
10 |
--------------------------------------------------------------------------------
/headers/mono/utils/jemalloc/SUBMODULES.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name": "jemalloc",
4 | "url": "https://github.com/mono/jemalloc.git",
5 | "rev": "896ed3a8b3f41998d4fb4d625d30ac63ef2d51fb",
6 | "remote-branch": "origin/master",
7 | "branch": "master",
8 | "directory": "jemalloc"
9 | }
10 | ]
11 |
--------------------------------------------------------------------------------
/headers/mono/metadata/marshal-ilgen.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_MARSHAL_ILGEN_H__
7 | #define __MONO_MARSHAL_ILGEN_H__
8 |
9 | MONO_API void
10 | mono_marshal_ilgen_init (void);
11 |
12 | #endif
13 |
--------------------------------------------------------------------------------
/headers/mono/dis/util.h:
--------------------------------------------------------------------------------
1 | typedef struct {
2 | int code;
3 | const char *str;
4 | } dis_map_t;
5 |
6 | const char *map (guint32 code, dis_map_t *table);
7 | const char *flags (guint32 code, dis_map_t *table);
8 | void hex_dump (const char *buffer, int base, int count);
9 | char* data_dump (const char *data, int len, const char* prefix);
10 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-config-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_METADATA_CONFIG_INTERNALS_H__
6 | #define __MONO_METADATA_CONFIG_INTERNALS_H__
7 |
8 | #include "mono/metadata/mono-config.h"
9 |
10 | void
11 | mono_config_for_assembly_internal (MonoImage *assembly);
12 |
13 | #endif /* __MONO_METADATA_CONFIG_INTERNALS_H__ */
14 |
--------------------------------------------------------------------------------
/headers/mono/eglib/gmodule-win32-internals.h:
--------------------------------------------------------------------------------
1 | #ifndef __G_MODULE_WINDOWS_INTERNALS_H__
2 | #define __G_MODULE_WINDOWS_INTERNALS_H__
3 |
4 | #include
5 | #include
6 |
7 | #ifdef G_OS_WIN32
8 | #include
9 |
10 | gpointer
11 | w32_find_symbol (const gchar *symbol_name);
12 | #endif /* G_OS_WIN32 */
13 | #endif /* __G_MODULE_WINDOWS_INTERNALS_H__ */
14 |
--------------------------------------------------------------------------------
/headers/mono/metadata/sgen-mono-ilgen.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_SGEN_MONO_ILGEN_H__
7 | #define __MONO_SGEN_MONO_ILGEN_H__
8 |
9 | #include "config.h"
10 |
11 | MONO_API void
12 | mono_sgen_mono_ilgen_init (void);
13 | #endif
14 |
--------------------------------------------------------------------------------
/headers/mono/vita.h:
--------------------------------------------------------------------------------
1 | #ifndef __MONO_VITA_H__
2 | #define __MONO_VITA_H__
3 |
4 | typedef struct MonoMainThreadParam {
5 | char *name;
6 | void *entry;
7 | unsigned int stackSize;
8 | unsigned int cpuAffinity;
9 | unsigned int priority;
10 | } MonoMainThreadParam;
11 |
12 | void MonoCreateMainThread(MonoMainThreadParam *param);
13 |
14 | void mono_thread_pool_cleanup();
15 |
16 | #endif
--------------------------------------------------------------------------------
/headers/mono/metadata/w32file-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef _MONO_METADATA_W32FILE_INTERNALS_H_
7 | #define _MONO_METADATA_W32FILE_INTERNALS_H_
8 |
9 | #include
10 | #include
11 |
12 | #endif /* _MONO_METADATA_W32FILE_INTERNALS_H_ */
13 |
--------------------------------------------------------------------------------
/headers/mono/native/pal_config.h:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #define MONO 1
4 | /* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */
5 | #if defined (TARGET_WASM) || defined (TARGET_IOS) || defined (TARGET_OSX) || defined (TARGET_WATCHOS) || defined (TARGET_TVOS)
6 | #undef HAVE_CLOCK_MONOTONIC
7 | #undef HAVE_CLOCK_MONOTONIC_COARSE
8 | #endif
9 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-proclib-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_PROCLIB_WINDOWS_H__
6 | #define __MONO_UTILS_PROCLIB_WINDOWS_H__
7 |
8 | #include
9 | #include
10 |
11 | #ifdef HOST_WIN32
12 | #include
13 | #include "mono/utils/mono-proclib.h"
14 |
15 | #endif /* HOST_WIN32 */
16 | #endif /* __MONO_UTILS_PROCLIB_WINDOWS_H__ */
17 |
18 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-dl-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_DL_WINDOWS_H__
6 | #define __MONO_UTILS_DL_WINDOWS_H__
7 |
8 | #include
9 | #include
10 |
11 | #ifdef HOST_WIN32
12 | #include "mono/utils/mono-dl.h"
13 |
14 | void*
15 | mono_dl_lookup_symbol_in_process (const char *symbol_name);
16 | #endif /* HOST_WIN32 */
17 | #endif /* __MONO_UTILS_DL_WINDOWS_H__ */
18 |
19 |
--------------------------------------------------------------------------------
/headers/mono/utils/parse.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Parsing for GC options.
4 | *
5 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 | */
7 |
8 | #ifndef __MONO_UTILS_PARSE_H__
9 | #define __MONO_UTILS_PARSE_H__
10 |
11 | #include
12 | #include
13 |
14 | gboolean mono_gc_parse_environment_string_extract_number (const char *str, size_t *out);
15 |
16 | #endif
17 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-path.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_PATH_H
6 | #define __MONO_PATH_H
7 |
8 | #include
9 | #include
10 |
11 | MONO_API gchar *mono_path_resolve_symlinks (const char *path);
12 | MONO_API gchar *mono_path_canonicalize (const char *path);
13 | gboolean mono_path_filename_in_basedir (const char *filename, const char *basedir);
14 |
15 | #endif /* __MONO_PATH_H */
16 |
17 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-once.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_ONCE_H__
6 | #define __MONO_ONCE_H__
7 |
8 | #include "mono-lazy-init.h"
9 |
10 | typedef mono_lazy_init_t mono_once_t;
11 |
12 | #define MONO_ONCE_INIT MONO_LAZY_INIT_STATUS_NOT_INITIALIZED
13 |
14 | static inline void
15 | mono_once (mono_once_t *once, void (*once_init) (void))
16 | {
17 | mono_lazy_initialize (once, once_init);
18 | }
19 |
20 | #endif /* __MONO_ONCE_H__ */
21 |
--------------------------------------------------------------------------------
/headers/mono/metadata/attach.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_ATTACH_H__
6 | #define __MONO_ATTACH_H__
7 |
8 | #include
9 | #include
10 |
11 | void
12 | mono_attach_parse_options (char *options);
13 |
14 | void
15 | mono_attach_init (void);
16 |
17 | gboolean
18 | mono_attach_start (void);
19 |
20 | void
21 | mono_attach_maybe_start (void);
22 |
23 | void
24 | mono_attach_cleanup (void);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-config-dirs.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_CONFIG_INTERNAL_H__
6 | #define __MONO_CONFIG_INTERNAL_H__
7 |
8 | #include
9 | #include
10 |
11 | const char*
12 | mono_config_get_assemblies_dir (void);
13 |
14 | const char*
15 | mono_config_get_cfg_dir (void);
16 |
17 | const char*
18 | mono_config_get_bin_dir (void);
19 |
20 | const char*
21 | mono_config_get_reloc_lib_dir (void);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-mmap-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_MMAP_WINDOWS_H__
6 | #define __MONO_UTILS_MMAP_WINDOWS_H__
7 |
8 | #include
9 | #include
10 |
11 | #ifdef HOST_WIN32
12 | #include "mono/utils/mono-mmap.h"
13 | #include "mono/utils/mono-mmap-internals.h"
14 |
15 | int
16 | mono_mmap_win_prot_from_flags (int flags);
17 | #endif /* HOST_WIN32 */
18 | #endif /* __MONO_UTILS_MMAP_WINDOWS_H__ */
19 |
20 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-embed.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_EMBED_H__
6 | #define __MONO_EMBED_H__
7 |
8 | #include
9 |
10 | /*
11 | * This is a fallback for platform symbol loading functionality.
12 | */
13 | typedef struct {
14 | const char *name;
15 | void *addr;
16 | } MonoDlMapping;
17 |
18 | MONO_API void mono_dl_register_library (const char *name, MonoDlMapping *mappings);
19 |
20 | #endif /* __MONO_EMBED_H__ */
21 |
--------------------------------------------------------------------------------
/headers/mono/profiler/helper.h:
--------------------------------------------------------------------------------
1 | #ifndef __MONO_PROFHELPER_H__
2 | #define __MONO_PROFHELPER_H__
3 |
4 | #ifndef HOST_WIN32
5 | #include
6 | #endif
7 | #ifdef HOST_WIN32
8 | #include
9 | #endif
10 |
11 | void mono_profhelper_add_to_fd_set (fd_set *set, int fd, int *max_fd);
12 | void mono_profhelper_close_socket_fd (int fd);
13 | void mono_profhelper_setup_command_server (int *server_socket, int *command_port, const char* profiler_name);
14 |
15 | #endif
16 |
--------------------------------------------------------------------------------
/headers/mono/utils/bsearch.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_BSEARCH_H__
6 | #define __MONO_BSEARCH_H__
7 |
8 | #include
9 |
10 | #include "mono/utils/mono-compiler.h"
11 |
12 | typedef int (* BinarySearchComparer) (const void *key, const void *member);
13 |
14 | void *
15 | mono_binary_search (
16 | const void *key,
17 | const void *array,
18 | size_t array_length,
19 | size_t member_size,
20 | BinarySearchComparer comparer);
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-errno.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Access the native error code
4 | *
5 | * Author:
6 | * Alexander Kyte (alkyte@microsoft.com)
7 | *
8 | * (C) 2018 Microsoft, Inc.
9 | *
10 | */
11 |
12 | #ifndef __MONO_ERRNO_H__
13 | #define __MONO_ERRNO_H__
14 |
15 | #include
16 |
17 | // Enough indirection to do something else here, or log
18 | inline static void
19 | mono_set_errno (int errno_val)
20 | {
21 | errno = errno_val;
22 | }
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-string.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __UTILS_MONO_STRING_H__
6 | #define __UTILS_MONO_STRING_H__
7 | #include
8 | /*
9 | * This definition is used to we remember later to implement this properly
10 | *
11 | * Currently we merely call into the ascii comparison, but we should be
12 | * instead doing case folding and comparing the result.
13 | */
14 | #define mono_utf8_strcasecmp g_ascii_strcasecmp
15 |
16 | #endif /* __UTILS_MONO_STRING_H__ */
17 |
--------------------------------------------------------------------------------
/headers/mono/zlib/inffast.h:
--------------------------------------------------------------------------------
1 | /* inffast.h -- header to use inffast.c
2 | * Copyright (C) 1995-2003, 2010 Mark Adler
3 | * For conditions of distribution and use, see copyright notice in zlib.h
4 | */
5 |
6 | /* WARNING: this file should *not* be used by applications. It is
7 | part of the implementation of the compression library and is
8 | subject to change. Applications should only use zlib.h.
9 | */
10 |
11 | void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
12 |
--------------------------------------------------------------------------------
/headers/mono/metadata/icalls.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_METADATA_ICALLS_H__
6 | #define __MONO_METADATA_ICALLS_H__
7 |
8 | #include
9 |
10 | #ifdef ENABLE_ICALL_EXPORT
11 | #define ICALL_EXPORT MONO_API
12 | #define ICALL_EXTERN_C G_EXTERN_C
13 | #else
14 | /* Can't be static as icall.c defines icalls referenced by icall-tables.c */
15 | #define ICALL_EXPORT /* nothing */
16 | #define ICALL_EXTERN_C /* nothing */
17 | #endif
18 |
19 | #endif // __MONO_METADATA_ICALLS_H__
20 |
--------------------------------------------------------------------------------
/headers/mono/metadata/w32file-win32-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef _MONO_METADATA_W32FILE_WIN32_INTERNALS_H_
7 | #define _MONO_METADATA_W32FILE_WIN32_INTERNALS_H_
8 |
9 | #include
10 | #include
11 |
12 | #ifdef HOST_WIN32
13 | #include "mono/metadata/w32file.h"
14 | #include "mono/metadata/w32file-internals.h"
15 | #endif /* HOST_WIN32 */
16 | #endif /* _MONO_METADATA_W32FILE_WIN32_INTERNALS_H_ */
17 |
--------------------------------------------------------------------------------
/headers/mono/metadata/environment.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * System.Environment support internal calls
4 | *
5 | * Author:
6 | * Dick Porter (dick@ximian.com)
7 | *
8 | * (C) 2002 Ximian, Inc
9 | */
10 |
11 | #ifndef _MONO_METADATA_ENVIRONMENT_H_
12 | #define _MONO_METADATA_ENVIRONMENT_H_
13 |
14 | #include
15 |
16 | MONO_BEGIN_DECLS
17 |
18 | MONO_API int32_t mono_environment_exitcode_get (void);
19 | MONO_API void mono_environment_exitcode_set (int32_t value);
20 |
21 | MONO_END_DECLS
22 |
23 | #endif /* _MONO_METADATA_ENVIRONMENT_H_ */
24 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-hash-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_G_HASH_INTERNALS_H__
6 | #define __MONO_G_HASH_INTERNALS_H__
7 |
8 | #include "mono/metadata/mono-hash.h"
9 | #include "mono/metadata/mono-gc.h"
10 |
11 | MonoGHashTable *
12 | mono_g_hash_table_new_type_internal (GHashFunc hash_func, GEqualFunc key_equal_func, MonoGHashGCType type, MonoGCRootSource source, void *key, const char *msg);
13 |
14 | void
15 | mono_g_hash_table_insert_internal (MonoGHashTable *h, gpointer k, gpointer v);
16 |
17 | #endif /* __MONO_G_HASH_INTERNALS_H__ */
18 |
--------------------------------------------------------------------------------
/headers/mono/metadata/w32semaphore.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_W32SEMAPHORE_H_
6 | #define _MONO_METADATA_W32SEMAPHORE_H_
7 |
8 | #include
9 | #include
10 | #include "object.h"
11 | #include "w32handle-namespace.h"
12 | #include
13 |
14 | void
15 | mono_w32semaphore_init (void);
16 |
17 | typedef struct MonoW32HandleNamedSemaphore MonoW32HandleNamedSemaphore;
18 |
19 | MonoW32HandleNamespace*
20 | mono_w32semaphore_get_namespace (MonoW32HandleNamedSemaphore *semaphore);
21 |
22 | #endif /* _MONO_METADATA_W32SEMAPHORE_H_ */
23 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-forward-internal.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * (C) 2018 Microsoft, Inc.
5 | *
6 | */
7 | #ifndef _MONO_UTILS_FORWARD_INTERNAL_
8 | #define _MONO_UTILS_FORWARD_INTERNAL_
9 |
10 | #include "mono-forward.h"
11 |
12 | typedef struct MonoAotModule MonoAotModule;
13 | typedef struct MonoHandleStack MonoHandleStack;
14 | typedef struct MonoJitTlsData MonoJitTlsData;
15 | typedef struct MonoLMF MonoLMF;
16 | typedef struct MonoTrampInfo MonoTrampInfo;
17 | typedef struct _MonoInternalThread MonoInternalThread;
18 | typedef struct _SgenThreadInfo SgenThreadInfo;
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/headers/mono/metadata/appdomain-icalls.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Appdomain-related icalls.
4 | * Copyright 2016 Microsoft
5 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6 | */
7 |
8 | #ifndef __MONO_METADATA_APPDOMAIN_ICALLS_H__
9 | #define __MONO_METADATA_APPDOMAIN_ICALLS_H__
10 |
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include "reflection-internals.h"
16 |
17 | #endif /*__MONO_METADATA_APPDOMAIN_ICALLS_H__*/
18 |
--------------------------------------------------------------------------------
/headers/mono/metadata/runtime.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Runtime functions
4 | *
5 | * Author:
6 | * Jonathan Pryor
7 | *
8 | * (C) 2010 Novell, Inc.
9 | */
10 |
11 | #ifndef _MONO_METADATA_RUNTIME_H_
12 | #define _MONO_METADATA_RUNTIME_H_
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | gboolean mono_runtime_try_shutdown (void);
20 |
21 | void mono_runtime_init_tls (void);
22 |
23 | MONO_PROFILER_API char* mono_runtime_get_aotid (void);
24 |
25 | #endif /* _MONO_METADATA_RUNTIME_H_ */
26 |
27 |
28 |
--------------------------------------------------------------------------------
/headers/mono/utils/ward.h:
--------------------------------------------------------------------------------
1 | #ifndef WARD_H
2 | #define WARD_H
3 |
4 | /*
5 | * Ward is a static analysis tool that can be used to check for the presense of
6 | * a certain class of bugs in C code.
7 | *
8 | * See https://github.com/evincarofautumn/Ward#annotating-your-code for the Ward
9 | * permission annotations syntax.
10 | *
11 | * The Mono permissions are defined in
12 | * https://github.com/evincarofautumn/Ward/blob/prod/mono.config
13 | */
14 | #if defined(__WARD__)
15 | #define MONO_PERMIT(...) __attribute__ ((ward (__VA_ARGS__)))
16 | #else
17 | #define MONO_PERMIT(...) /*empty*/
18 | #endif
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/headers/mono/metadata/marshal-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_MARSHAL_WINDOWS_INTERNALS_H__
7 | #define __MONO_METADATA_MARSHAL_WINDOWS_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | #ifdef HOST_WIN32
13 | #include "mono/metadata/marshal.h"
14 | #include "mono/metadata/marshal-internals.h"
15 | #include "mono/metadata/exception.h"
16 | #endif /* HOST_WIN32 */
17 |
18 | #endif /* __MONO_METADATA_MARSHAL_WINDOWS_INTERNALS_H__ */
19 |
--------------------------------------------------------------------------------
/headers/mono/metadata/console-win32-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_CONSOLE_WIN32_INTERNALS_H__
7 | #define __MONO_CONSOLE_WIN32_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | #include "mono/metadata/object.h"
13 | #include "mono/metadata/object-internals.h"
14 | #include "mono/utils/mono-error.h"
15 | #include "mono/utils/mono-error-internals.h"
16 | #include
17 |
18 | #endif /* __MONO_CONSOLE_WIN32_INTERNALS_H__ */
19 |
20 |
--------------------------------------------------------------------------------
/headers/mono/mini/lldb.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_XDEBUG_LLDB_H__
6 | #define __MONO_XDEBUG_LLDB_H__
7 |
8 | #include "config.h"
9 | #include "mini.h"
10 |
11 | void mono_lldb_init (const char *options);
12 |
13 | void mono_lldb_save_method_info (MonoCompile *cfg);
14 |
15 | void mono_lldb_save_trampoline_info (MonoTrampInfo *info);
16 |
17 | void mono_lldb_remove_method (MonoDomain *domain, MonoMethod *method, MonoJitDynamicMethodInfo *info);
18 |
19 | void mono_lldb_save_specific_trampoline_info (gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, gpointer code, guint32 code_len);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/headers/mono/mini/llvm-runtime.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Runtime support for llvm generated code
4 | *
5 | * Authors:
6 | * Zoltan Varga (vargaz@gmail.com)
7 | *
8 | * (C) 2015 Xamarin, Inc.
9 | */
10 |
11 | #ifndef __MONO_LLVM_RUNTIME_H__
12 | #define __MONO_LLVM_RUNTIME_H__
13 |
14 | #include
15 |
16 | G_BEGIN_DECLS
17 |
18 | typedef void (*MonoLLVMInvokeCallback) (void *arg);
19 |
20 | void
21 | mono_llvm_cpp_throw_exception (void);
22 |
23 | void
24 | mono_llvm_cpp_catch_exception (MonoLLVMInvokeCallback cb, gpointer arg, gboolean *out_thrown);
25 |
26 | G_END_DECLS
27 |
28 | #endif /* __MONO_LLVM_RUNTIME_H__ */
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/headers/mono/mini/trace.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_TRACE_H__
6 | #define __MONO_TRACE_H__
7 | #include
8 | #include "mono/utils/mono-compiler.h"
9 | #include "mono/metadata/icalls.h"
10 |
11 | ICALL_EXTERN_C
12 | void
13 | mono_trace_enter_method (MonoMethod *method, MonoJitInfo *ji, MonoProfilerCallContext *ctx);
14 |
15 | ICALL_EXTERN_C
16 | void
17 | mono_trace_leave_method (MonoMethod *method, MonoJitInfo *ji, MonoProfilerCallContext *ctx);
18 |
19 | void mono_trace_enable (gboolean enable);
20 | gboolean mono_trace_is_enabled (void);
21 | gboolean mono_trace_eval_exception (MonoClass *klass);
22 |
23 | #endif /* __MONO_TRACE_H__ */
24 |
--------------------------------------------------------------------------------
/headers/mono/metadata/sgen-mono.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_SGEN_MONO_H__
7 | #define __MONO_SGEN_MONO_H__
8 |
9 | #define MONO_SGEN_MONO_CALLBACKS_VERSION 1
10 |
11 | typedef struct {
12 | int version;
13 | void (*emit_nursery_check) (MonoMethodBuilder *mb, gboolean is_concurrent);
14 | void (*emit_managed_allocator) (MonoMethodBuilder *mb, gboolean slowpath, gboolean profiler, int atype);
15 | } MonoSgenMonoCallbacks;
16 |
17 | void
18 | mono_install_sgen_mono_callbacks (MonoSgenMonoCallbacks *cb);
19 |
20 | #endif
21 |
--------------------------------------------------------------------------------
/headers/mono/metadata/rand.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * System.Security.Cryptography.RNGCryptoServiceProvider support
4 | *
5 | * Author:
6 | * Mark Crichton (crichton@gimp.org)
7 | * Sebastien Pouliot (sebastien@ximian.com)
8 | *
9 | * (C) 2001 Ximian, Inc.
10 | * Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com)
11 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
12 | */
13 |
14 | #ifndef _MONO_METADATA_RAND_H_
15 | #define _MONO_METADATA_RAND_H_
16 |
17 | #include
18 | #include
19 | #include "mono/utils/mono-compiler.h"
20 | #include
21 |
22 | #endif
23 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-rand.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_UTILS_RAND_H_
6 | #define _MONO_UTILS_RAND_H_
7 |
8 | #include
9 |
10 | #include "mono-compiler.h"
11 | #include "mono-error.h"
12 |
13 | gboolean
14 | mono_rand_open (void);
15 |
16 | gpointer
17 | mono_rand_init (const guchar *seed, gssize seed_size);
18 |
19 | gboolean
20 | mono_rand_try_get_bytes (gpointer *handle, guchar *buffer, gssize buffer_size, MonoError *error);
21 |
22 | gboolean
23 | mono_rand_try_get_uint32 (gpointer *handle, guint32 *val, guint32 min, guint32 max, MonoError *error);
24 |
25 | void
26 | mono_rand_close (gpointer handle);
27 |
28 | #endif /* _MONO_UTILS_RAND_H_ */
29 |
--------------------------------------------------------------------------------
/headers/mono/metadata/icall-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_ICALL_WINDOWS_INTERNALS_H__
7 | #define __MONO_METADATA_ICALL_WINDOWS_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | #ifdef HOST_WIN32
13 | #include "mono/metadata/icall-internals.h"
14 | #include "mono/metadata/object.h"
15 | #include "mono/metadata/object-internals.h"
16 | #include "mono/metadata/class.h"
17 | #include "mono/metadata/class-internals.h"
18 | #endif /* HOST_WIN32 */
19 | #endif /* __MONO_METADATA_ICALL_WINDOWS_INTERNALS_H__ */
20 |
--------------------------------------------------------------------------------
/VitaMonoLoader/VML.h:
--------------------------------------------------------------------------------
1 | #ifndef _VML_H_
2 | #define _VML_H_
3 |
4 | #include
5 |
6 | #ifdef VML_BUILD
7 | #define VML_EXPORT __declspec(dllexport)
8 | #else
9 | #define VML_EXPORT
10 | #endif
11 |
12 |
13 | typedef void(*VMLRootDomainEntry)();
14 |
15 | typedef struct VMLInitOptParam {
16 | unsigned int stackSize;
17 | unsigned int cpuAffinity;
18 | unsigned int priority;
19 | bool monoVerboseDebug;
20 | } VMLInitOptParam;
21 |
22 | VML_EXPORT int VMLInitialize(VMLRootDomainEntry domainEntry, VMLInitOptParam *pOptParam);
23 |
24 | VML_EXPORT int VMLRunMain(const char *sMainDllPath, void **ppMainAotAssemblyInfo);
25 |
26 | VML_EXPORT int VMLRegisterAssembly(void **ppAotAssemblyInfo);
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/headers/mono/metadata/console-io.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Console IO internal calls
4 | *
5 | * Author:
6 | * Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 | *
8 | * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #ifndef _MONO_METADATA_CONSOLEIO_H
13 | #define _MONO_METADATA_CONSOLEIO_H
14 |
15 | #include
16 | #include
17 |
18 | #include
19 | #include
20 | #include
21 |
22 | void mono_console_init (void);
23 | void mono_console_handle_async_ops (void);
24 |
25 | #endif /* _MONO_METADATA_CONSOLEIO_H */
26 |
--------------------------------------------------------------------------------
/headers/mono/metadata/method-builder-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METHOD_BUILDER_INTERNALS_H__
7 | #define __MONO_METHOD_BUILDER_INTERNALS_H__
8 |
9 | #include "config.h"
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | /* noilgen version */
18 | struct _MonoMethodBuilder {
19 | MonoMethod *method;
20 | gchar *name;
21 | gboolean no_dup_name;
22 | };
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/headers/mono/metadata/string-icalls.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_CLI_STRING_ICALLS_H_
6 | #define _MONO_CLI_STRING_ICALLS_H_
7 |
8 | /*
9 | * string-icalls.h: String internal calls for the corlib
10 | *
11 | * Author:
12 | * Patrik Torstensson (patrik.torstensson@labs2.com)
13 | *
14 | * (C) 2001 Ximian, Inc.
15 | */
16 |
17 | #include
18 | #include
19 | #include
20 | #include "mono/utils/mono-compiler.h"
21 | #include
22 |
23 | ICALL_EXPORT
24 | void
25 | ves_icall_System_String_ctor_RedirectToCreateString (void);
26 |
27 | ICALL_EXPORT
28 | int
29 | ves_icall_System_String_GetLOSLimit (void);
30 |
31 | #endif /* _MONO_CLI_STRING_ICALLS_H_ */
32 |
--------------------------------------------------------------------------------
/VML_Sample2/Sample2.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Runtime.CompilerServices;
3 |
4 | public class Program
5 | {
6 | public static int Main()
7 | {
8 | Vita2D.Init();
9 | Vita2D.SetClearColor(Vita2D.RGBA8(150, 150, 150, 255));
10 | int pgf = Vita2D.LoadDefaultPGF();
11 |
12 | while (true)
13 | {
14 | Vita2D.StartDrawing();
15 | Vita2D.ClearScreen();
16 |
17 | Vita2D.DrawRectangle(680, 350, 100, 150, Vita2D.RGBA8(0, 0, 255, 255));
18 | Vita2D.PGFDrawText(pgf, 480, 272, Vita2D.RGBA8(0, 255, 0, 255), 1, "Hello from C# Vita2D!");
19 |
20 | Vita2D.EndDrawing();
21 | Vita2D.SwapBuffers();
22 | }
23 |
24 | return 123;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/headers/mono/metadata/object-forward.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * Forward declarations of opaque types, and typedefs thereof.
5 | *
6 | */
7 |
8 | #ifndef __MONO_OBJECT_FORWARD_H__
9 | #define __MONO_OBJECT_FORWARD_H__
10 |
11 | #include
12 |
13 | typedef struct _MonoClass MonoClass;
14 | typedef struct _MonoImage MonoImage;
15 | typedef struct _MonoMethod MonoMethod;
16 |
17 | typedef struct _MonoObject MONO_RT_MANAGED_ATTR MonoObject;
18 | typedef struct _MonoException MONO_RT_MANAGED_ATTR MonoException;
19 | typedef struct _MonoReflectionAssembly MONO_RT_MANAGED_ATTR MonoReflectionAssembly;
20 | typedef struct _MonoReflectionTypeBuilder MONO_RT_MANAGED_ATTR MonoReflectionTypeBuilder;
21 |
22 | #endif /* __MONO_OBJECT_FORWARD_H__ */
23 |
--------------------------------------------------------------------------------
/headers/mono/metadata/w32handle-namespace.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_W32HANDLE_NAMESPACE_H_
6 | #define _MONO_METADATA_W32HANDLE_NAMESPACE_H_
7 |
8 | #include
9 | #include
10 |
11 | #include "mono/metadata/w32handle.h"
12 |
13 | #define MONO_W32HANDLE_NAMESPACE_MAX_PATH 260
14 |
15 | typedef struct {
16 | gchar name [MONO_W32HANDLE_NAMESPACE_MAX_PATH + 1];
17 | } MonoW32HandleNamespace;
18 |
19 | void
20 | mono_w32handle_namespace_init (void);
21 |
22 | void
23 | mono_w32handle_namespace_lock (void);
24 |
25 | void
26 | mono_w32handle_namespace_unlock (void);
27 |
28 | gpointer
29 | mono_w32handle_namespace_search_handle (MonoW32Type type, const gchar *name);
30 |
31 | #endif /* _MONO_METADATA_W32HANDLE_NAMESPACE_H_ */
32 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-mmap-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Internal virtual memory stuff.
4 | *
5 | * Copyright (C) 2014 Xamarin Inc
6 | *
7 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 | */
9 |
10 | #ifndef __MONO_UTILS_MMAP_INTERNAL_H__
11 | #define __MONO_UTILS_MMAP_INTERNAL_H__
12 |
13 | #include "mono-compiler.h"
14 |
15 | void *
16 | mono_malloc_shared_area (int pid);
17 |
18 | char*
19 | mono_aligned_address (char *mem, size_t size, size_t alignment);
20 |
21 | void
22 | mono_account_mem (MonoMemAccountType type, ssize_t size);
23 |
24 | gboolean
25 | mono_valloc_can_alloc (size_t size);
26 |
27 | void
28 | mono_valloc_set_limit (size_t size);
29 |
30 | #endif /* __MONO_UTILS_MMAP_INTERNAL_H__ */
31 |
--------------------------------------------------------------------------------
/headers/mono/dis/declsec.h:
--------------------------------------------------------------------------------
1 | /*
2 | * declsec.h: Support for the new declarative security attribute
3 | * metadata format (2.0)
4 | *
5 | * Author:
6 | * Sebastien Pouliot
7 | *
8 | * Copyright (C) 2005 Novell, Inc (http://www.novell.com)
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #ifndef __MONODIS_DECLSEC_H__
13 | #define __MONODIS_DECLSEC_H__
14 |
15 | #define MONO_DECLSEC_FORMAT_20 0x2E
16 |
17 | #define MONO_DECLSEC_FIELD 0x53
18 | #define MONO_DECLSEC_PROPERTY 0x54
19 | #define MONO_DECLSEC_ENUM 0x55
20 |
21 | #define MONO_TYPE_SYSTEM_TYPE 0x50
22 |
23 | char* dump_declsec_entry20 (MonoImage *m, const char* p, const char *indent);
24 |
25 | #endif /* __MONODIS_DECLSEC_H__ */
26 |
--------------------------------------------------------------------------------
/headers/mono/metadata/property-bag.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Linearizable property bag.
4 | *
5 | * Authors:
6 | * Rodrigo Kumpera (kumpera@gmail.com)
7 | *
8 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
9 | */
10 | #ifndef __MONO_METADATA_PROPERTY_BAG_H__
11 | #define __MONO_METADATA_PROPERTY_BAG_H__
12 |
13 | #include
14 |
15 | typedef struct _MonoPropertyBagItem MonoPropertyBagItem;
16 |
17 | struct _MonoPropertyBagItem {
18 | MonoPropertyBagItem *next;
19 | int tag;
20 | };
21 |
22 | typedef struct {
23 | MonoPropertyBagItem *head;
24 | } MonoPropertyBag;
25 |
26 | void* mono_property_bag_get (MonoPropertyBag *bag, int tag);
27 | void* mono_property_bag_add (MonoPropertyBag *bag, void *value);
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/headers/mono/metadata/threadpool-io.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_THREADPOOL_IO_H_
6 | #define _MONO_METADATA_THREADPOOL_IO_H_
7 |
8 | #include
9 | #include
10 |
11 | #ifndef ENABLE_NETCORE
12 |
13 | #include
14 | #include
15 |
16 | typedef struct _MonoIOSelectorJob MonoIOSelectorJob;
17 |
18 | TYPED_HANDLE_DECL (MonoIOSelectorJob);
19 |
20 | ICALL_EXPORT
21 | void
22 | ves_icall_System_IOSelector_Remove (gpointer handle);
23 |
24 | void
25 | mono_threadpool_io_remove_socket (int fd);
26 | void
27 | mono_threadpool_io_remove_domain_jobs (MonoDomain *domain);
28 | void
29 | mono_threadpool_io_cleanup (void);
30 |
31 | #endif /* ENABLE_NETCORE */
32 |
33 | #endif /* _MONO_METADATA_THREADPOOL_IO_H_ */
34 |
--------------------------------------------------------------------------------
/headers/mono/metadata/security.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Security internal calls
4 | *
5 | * Author:
6 | * Sebastien Pouliot
7 | *
8 | * (C) 2004 Novell (http://www.novell.com)
9 | */
10 |
11 |
12 | #ifndef _MONO_METADATA_SECURITY_H_
13 | #define _MONO_METADATA_SECURITY_H_
14 |
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 | #include
22 | #include "reflection-internals.h"
23 |
24 | /* System.Security.Principal.WindowsIdentity */
25 | gpointer
26 | mono_security_principal_windows_identity_get_current_token (MonoError *error);
27 |
28 | #endif /* _MONO_METADATA_SECURITY_H_ */
29 |
--------------------------------------------------------------------------------
/headers/mono/native/pal-android.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * System.Native PAL internal calls (Android)
4 | * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL)
5 | * Copyright 2018 Microsoft
6 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
7 | */
8 |
9 | #include "pal_compiler.h"
10 |
11 | /**
12 | * Reads the number of bytes specified into the provided buffer from the specified, opened file descriptor.
13 | *
14 | * Returns the number of bytes read on success; otherwise, -1 is returned an errno is set.
15 | *
16 | * Note - on fail. the position of the stream may change depending on the platform; consult man 2 read for more info
17 | */
18 | DLLEXPORT int32_t SystemNative_Read(intptr_t fd, void* buffer, int32_t bufferSize);
19 |
--------------------------------------------------------------------------------
/headers/mono/utils/strenc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * string encoding conversions
4 | *
5 | * Author:
6 | * Dick Porter (dick@ximian.com)
7 | *
8 | * (C) 2003 Ximian, Inc.
9 | */
10 |
11 | #ifndef _MONO_STRENC_H_
12 | #define _MONO_STRENC_H_ 1
13 |
14 | #include
15 | #include
16 |
17 | MONO_API gunichar2 *mono_unicode_from_external (const gchar *in, gsize *bytes);
18 | MONO_API gchar *mono_utf8_from_external (const gchar *in);
19 | MONO_API gchar *mono_unicode_to_external (const gunichar2 *uni);
20 | MONO_API gboolean mono_utf8_validate_and_len (const gchar *source, glong* oLength, const gchar** oEnd);
21 | MONO_API gboolean mono_utf8_validate_and_len_with_bounds (const gchar *source, glong max_bytes, glong* oLength, const gchar** oEnd);
22 |
23 | #endif /* _MONO_STRENC_H_ */
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Prerequisites
2 | *.d
3 |
4 | # Object files
5 | *.o
6 | *.ko
7 | *.obj
8 | *.elf
9 |
10 | # Linker output
11 | *.ilk
12 | *.map
13 | *.exp
14 |
15 | # Precompiled Headers
16 | *.gch
17 | *.pch
18 |
19 | # Libraries
20 | *.lib
21 | *.la
22 | *.lo
23 |
24 | # Shared objects (inc. Windows DLLs)
25 | *.dll
26 | *.so
27 | *.so.*
28 | *.dylib
29 |
30 | # Executables
31 | *.exe
32 | *.out
33 | *.app
34 | *.i*86
35 | *.x86_64
36 | *.hex
37 |
38 | # Debug files
39 | *.dSYM/
40 | *.su
41 | *.idb
42 | *.pdb
43 |
44 | # Kernel Module Compile Results
45 | *.mod*
46 | *.cmd
47 | .tmp_versions/
48 | modules.order
49 | Module.symvers
50 | Mkfile.old
51 | dkms.conf
52 |
53 | # VDS
54 | *.vs
55 | eboot.bin
56 | eboot2.bin
57 | param.sfo
58 | param2.sfo
59 | PSVita_Debug
60 | PSVita_Release
61 | VMLCoreAssemblies
62 | CONTENTS
--------------------------------------------------------------------------------
/headers/mono/metadata/w32mutex.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_W32MUTEX_H_
6 | #define _MONO_METADATA_W32MUTEX_H_
7 |
8 | #include
9 | #include
10 |
11 | #include "object.h"
12 | #include "object-internals.h"
13 | #include "w32handle-namespace.h"
14 | #include
15 |
16 | void
17 | mono_w32mutex_init (void);
18 |
19 | ICALL_EXPORT
20 | MonoBoolean
21 | ves_icall_System_Threading_Mutex_ReleaseMutex_internal (gpointer handle);
22 |
23 | typedef struct MonoW32HandleNamedMutex MonoW32HandleNamedMutex;
24 |
25 | MonoW32HandleNamespace*
26 | mono_w32mutex_get_namespace (MonoW32HandleNamedMutex *mutex);
27 |
28 | #ifndef HOST_WIN32
29 | void
30 | mono_w32mutex_abandon (MonoInternalThread *internal);
31 | #endif
32 |
33 | #endif /* _MONO_METADATA_W32MUTEX_H_ */
34 |
--------------------------------------------------------------------------------
/headers/mono/mini/THIRD-PARTY-NOTICES.TXT:
--------------------------------------------------------------------------------
1 | Mono uses third-party libraries or other resources that may be
2 | distributed under licenses different than the Mono software.
3 |
4 | Attributions and license notices for test cases originally authored by
5 | third parties can be found in the respective test directories.
6 |
7 | In the event that we accidentally failed to list a required notice, please
8 | bring it to our attention. Post an issue or email us:
9 |
10 | dotnet@microsoft.com
11 |
12 | The attached notices are provided for information only.
13 |
14 | License notice for Southern Storm Software
15 | ------------------------------------------
16 |
17 | GPL: Copyright (C) 2001 Southern Storm Software, Pty Ltd.
18 |
19 | Use: https://github.com/mono/mono/blob/23e6f6f4b58d72800f4e27fa29a6b58806ff475f/mono/mini/bench.cs#L65
20 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-experiments.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _MONO_EXPERIMENTS_H_
3 | #define _MONO_EXPERIMENTS_H_
4 |
5 | #include
6 |
7 | #include "mono/utils/mono-lazy-init.h"
8 |
9 |
10 | extern mono_lazy_init_t mono_experiments_enabled_init;
11 |
12 | extern guint8 mono_experiments_enabled_table[];
13 |
14 | void mono_experiments_initialize_table (void);
15 |
16 | static inline gboolean
17 | mono_experiment_enabled (int experiment_id) {
18 | mono_lazy_initialize (&mono_experiments_enabled_init, mono_experiments_initialize_table);
19 | return !!mono_experiments_enabled_table[experiment_id];
20 | }
21 |
22 | typedef enum MonoExperimentId {
23 | #define EXPERIMENT(id,ghurl) MONO_EXPERIMENT_ ## id ,
24 | #include "mono-experiments.def"
25 | #undef EXPERIMENT
26 | MONO_EXPERIMENT_NUM_EXPERIMENTS
27 | } MonoExperimentId;
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/headers/mono/sgen/sgen-major-copy-object.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Object copying in the major collectors.
4 | *
5 | * Copyright 2001-2003 Ximian, Inc
6 | * Copyright 2003-2010 Novell, Inc.
7 | * Copyright (C) 2012 Xamarin Inc
8 | *
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #define collector_pin_object(obj, queue) do { \
13 | if (sgen_ptr_in_nursery (obj)) { \
14 | sgen_pin_object (obj, queue); \
15 | } else { \
16 | g_assert (objsize <= SGEN_MAX_SMALL_OBJ_SIZE); \
17 | pin_major_object (obj, queue); \
18 | } \
19 | } while (0)
20 |
21 | #define COLLECTOR_SERIAL_ALLOC_FOR_PROMOTION sgen_minor_collector.alloc_for_promotion
22 | #define COLLECTOR_PARALLEL_ALLOC_FOR_PROMOTION sgen_minor_collector.alloc_for_promotion_par
23 |
24 | #include "sgen-copy-object.h"
25 |
--------------------------------------------------------------------------------
/headers/mono/metadata/sgen-toggleref.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * toggleref support for sgen
4 | *
5 | * Copyright 2011 Xamarin, Inc.
6 | *
7 | * Author:
8 | * Rodrigo Kumpera (kumpera@gmail.com)
9 | *
10 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
11 | */
12 |
13 | #ifndef _MONO_SGEN_TOGGLEREF_H_
14 | #define _MONO_SGEN_TOGGLEREF_H_
15 |
16 | #include
17 |
18 | /* GC toggle ref support */
19 |
20 | typedef enum {
21 | MONO_TOGGLE_REF_DROP,
22 | MONO_TOGGLE_REF_STRONG,
23 | MONO_TOGGLE_REF_WEAK
24 | } MonoToggleRefStatus;
25 |
26 | MONO_API void mono_gc_toggleref_register_callback (MonoToggleRefStatus (*proccess_toggleref) (MonoObject *obj));
27 | MONO_API MONO_RT_EXTERNAL_ONLY void mono_gc_toggleref_add (MonoObject *object, mono_bool strong_ref);
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/headers/mono/utils/memfuncs.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Our own bzero/memmove.
4 | *
5 | * Copyright (C) 2015 Xamarin Inc
6 | *
7 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 | */
9 |
10 | #ifndef __MONO_UTILS_MEMFUNCS_H__
11 | #define __MONO_UTILS_MEMFUNCS_H__
12 |
13 | #include
14 | #include
15 |
16 | /*
17 | These functions must be used when it's possible that either destination is not
18 | word aligned or size is not a multiple of word size.
19 | */
20 | void mono_gc_bzero_atomic (void *dest, size_t size);
21 | void mono_gc_bzero_aligned (void *dest, size_t size);
22 | void mono_gc_memmove_atomic (void *dest, const void *src, size_t size);
23 | void mono_gc_memmove_aligned (void *dest, const void *src, size_t size);
24 | guint64 mono_determine_physical_ram_size (void);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/headers/mono/mini/mini-windows.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_MINI_WINDOWS_H__
6 | #define __MONO_MINI_WINDOWS_H__
7 |
8 | #include
9 | #include
10 |
11 | #ifdef HOST_WIN32
12 | #include "windows.h"
13 | #include "mini.h"
14 | #include "mono/utils/mono-context.h"
15 |
16 | gboolean
17 | mono_setup_thread_context(DWORD thread_id, MonoContext *mono_context);
18 |
19 | typedef enum {
20 | MONO_WIN32_TLS_CALLBACK_TYPE_NONE,
21 | MONO_WIN32_TLS_CALLBACK_TYPE_DLL,
22 | MONO_WIN32_TLS_CALLBACK_TYPE_LIB
23 | } MonoWin32TLSCallbackType;
24 |
25 | gboolean
26 | mono_win32_handle_tls_callback_type (MonoWin32TLSCallbackType);
27 |
28 | BOOL
29 | mono_win32_runtime_tls_callback (HMODULE module_handle, DWORD reason, LPVOID reserved, MonoWin32TLSCallbackType callback_type);
30 |
31 | #endif /* HOST_WIN32 */
32 | #endif /* __MONO_MINI_WINDOWS_H__ */
33 |
--------------------------------------------------------------------------------
/headers/mono/mini/tasklets.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_TASKLETS_H__
6 | #define __MONO_TASKLETS_H__
7 |
8 | #include "mini.h"
9 |
10 | typedef struct {
11 | MonoLMF *lmf;
12 | gpointer top_sp;
13 | MonoNativeThreadId thread_id;
14 | MonoDomain *domain;
15 |
16 | /* the instruction pointer and stack to return to on Restore */
17 | gpointer return_ip;
18 | gpointer return_sp;
19 |
20 | /* the saved stack information */
21 | int stack_alloc_size;
22 | int stack_used_size;
23 | /* pointer to GC memory */
24 | gpointer saved_stack;
25 | } MonoContinuation;
26 |
27 | typedef void (*MonoContinuationRestore) (MonoContinuation *cont, int state, MonoLMF **lmf_addr);
28 |
29 | void mono_tasklets_init (void);
30 | void mono_tasklets_cleanup (void);
31 |
32 | MonoContinuationRestore mono_tasklets_arch_restore (void);
33 |
34 | #endif /* __MONO_TASKLETS_H__ */
35 |
36 |
--------------------------------------------------------------------------------
/headers/mono/metadata/number-ms.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_NUMBER_MS_H__
6 | #define __MONO_NUMBER_MS_H__
7 |
8 | #include
9 |
10 | // Double floating point Bias
11 | #define MONO_DOUBLE_BIAS 1022
12 |
13 | // Structure to access an encoded double floating point
14 | typedef struct {
15 | #if G_BYTE_ORDER == G_BIG_ENDIAN
16 | guint sign : 1;
17 | guint exp : 11;
18 | guint mantHi : 20;
19 | guint mantLo : 32;
20 |
21 | #define MONO_INIT_DOUBLE(sign, exp, mantHi, mantLo) { sign, exp, mantHi, mantLo }
22 |
23 | #else // BIGENDIAN
24 | guint mantLo : 32;
25 | guint mantHi : 20;
26 | guint exp : 11;
27 | guint sign : 1;
28 |
29 | #define MONO_INIT_DOUBLE(sign, exp, mantHi, mantLo) { mantLo, mantHi, exp, sign }
30 |
31 | #endif
32 | } MonoDouble;
33 |
34 | typedef union {
35 | MonoDouble s;
36 | gdouble d;
37 | } MonoDouble_double;
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/headers/mono/metadata/external-only.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Shorthand and markers for functions only used by embedders.
4 | * MONO_ENTER_GC_UNSAFE is also a good indication of external_only.
5 | *
6 | * Author:
7 | * Jay Krell (jaykrell@microsoft.com)
8 | *
9 | * Copyright 2018 Microsoft
10 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
11 | */
12 |
13 | #ifndef MONO_EXTERNAL_ONLY
14 |
15 | #define MONO_EXTERNAL_ONLY_GC_UNSAFE(t, expr) \
16 | t result; \
17 | MONO_ENTER_GC_UNSAFE; \
18 | result = expr; \
19 | MONO_EXIT_GC_UNSAFE; \
20 | return result;
21 |
22 | #define MONO_EXTERNAL_ONLY_GC_UNSAFE_VOID(expr) \
23 | MONO_ENTER_GC_UNSAFE; \
24 | expr; \
25 | MONO_EXIT_GC_UNSAFE; \
26 |
27 | #define MONO_EXTERNAL_ONLY(t, expr) return expr;
28 | #define MONO_EXTERNAL_ONLY_VOID(expr) expr;
29 |
30 | #endif /* MONO_EXTERNAL_ONLY */
31 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-logger.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_LOGGER_H__
6 | #define __MONO_LOGGER_H__
7 |
8 | #include
9 | MONO_BEGIN_DECLS
10 |
11 | MONO_API void
12 | mono_trace_set_level_string (const char *value);
13 |
14 | MONO_API void
15 | mono_trace_set_mask_string (const char *value);
16 |
17 | typedef void (*MonoPrintCallback) (const char *string, mono_bool is_stdout);
18 | typedef void (*MonoLogCallback) (const char *log_domain, const char *log_level, const char *message, mono_bool fatal, void *user_data);
19 |
20 | MONO_API void
21 | mono_trace_set_log_handler (MonoLogCallback callback, void *user_data);
22 |
23 | MONO_API void
24 | mono_trace_set_print_handler (MonoPrintCallback callback);
25 |
26 | MONO_API void
27 | mono_trace_set_printerr_handler (MonoPrintCallback callback);
28 |
29 | MONO_END_DECLS
30 |
31 | #endif /* __MONO_LOGGER_H__ */
32 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-networkinterfaces.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_NETWORK_INTERFACES_H__
6 | #define __MONO_NETWORK_INTERFACES_H__
7 | /*
8 | * Utility functions to access network information.
9 | */
10 |
11 | #include
12 | #include
13 |
14 | /* never remove or reorder these enums values: they are used in corlib/System */
15 |
16 | typedef enum {
17 | MONO_NETWORK_BYTESREC,
18 | MONO_NETWORK_BYTESSENT,
19 | MONO_NETWORK_BYTESTOTAL
20 | } MonoNetworkData;
21 |
22 | typedef enum {
23 | MONO_NETWORK_ERROR_NONE, /* no error happened */
24 | MONO_NETWORK_ERROR_NOT_FOUND, /* adapter name invalid */
25 | MONO_NETWORK_ERROR_OTHER
26 | } MonoNetworkError;
27 |
28 | gpointer *mono_networkinterface_list (int *size);
29 | gint64 mono_network_get_data (char* name, MonoNetworkData data, MonoNetworkError *error);
30 |
31 | #endif /* __MONO_NETWORK_INTERFACES_H__ */
32 |
33 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-key.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-key.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/7/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_key__
10 | #define __btls__btls_key__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509.h"
15 |
16 | MONO_API EVP_PKEY *
17 | mono_btls_key_new ();
18 |
19 | MONO_API void
20 | mono_btls_key_free (EVP_PKEY *pkey);
21 |
22 | MONO_API EVP_PKEY *
23 | mono_btls_key_up_ref (EVP_PKEY *pkey);
24 |
25 | MONO_API int
26 | mono_btls_key_get_bits (EVP_PKEY *pkey);
27 |
28 | MONO_API int
29 | mono_btls_key_is_rsa (EVP_PKEY *pkey);
30 |
31 | MONO_API int
32 | mono_btls_key_assign_rsa_private_key (EVP_PKEY *pkey, uint8_t *der_data, int der_length);
33 |
34 | MONO_API int
35 | mono_btls_key_get_bytes (EVP_PKEY *pkey, uint8_t **buffer, int *size, int include_private_bits);
36 |
37 | #endif /* __btls__btls_key__ */
38 |
39 |
--------------------------------------------------------------------------------
/VML_Sample2/VML_Sample2.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cxx;cc;s;asm
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 |
19 |
20 | Source Files
21 |
22 |
23 | Source Files
24 |
25 |
26 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-error.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-util.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/23/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_error__
10 | #define __btls__btls_error__
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include "btls-util.h"
17 |
18 | MONO_API int
19 | mono_btls_error_peek_error (void);
20 |
21 | MONO_API int
22 | mono_btls_error_get_error (void);
23 |
24 | MONO_API void
25 | mono_btls_error_clear_error (void);
26 |
27 | MONO_API int
28 | mono_btls_error_peek_error_line (const char **file, int *line);
29 |
30 | MONO_API int
31 | mono_btls_error_get_error_line (const char **file, int *line);
32 |
33 | MONO_API void
34 | mono_btls_error_get_error_string_n (int error, char *buf, int len);
35 |
36 | MONO_API int
37 | mono_btls_error_get_reason (int error);
38 |
39 | #endif /* __btls__btls_error__ */
40 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-perfcounters.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_PERFCOUNTERS_H__
6 | #define __MONO_PERFCOUNTERS_H__
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | typedef struct _MonoCounterSample MonoCounterSample;
14 |
15 | ICALL_EXPORT
16 | MonoBoolean mono_perfcounter_get_sample (void *impl, MonoBoolean only_value, MonoCounterSample *sample);
17 |
18 | ICALL_EXPORT
19 | gint64 mono_perfcounter_update_value (void *impl, MonoBoolean do_incr, gint64 value);
20 |
21 | ICALL_EXPORT
22 | void mono_perfcounter_free_data (void *impl);
23 |
24 | typedef gboolean (*PerfCounterEnumCallback) (char *category_name, char *name, unsigned char type, gint64 value, gpointer user_data);
25 | MONO_API void mono_perfcounter_foreach (PerfCounterEnumCallback cb, gpointer user_data);
26 |
27 | #endif /* __MONO_PERFCOUNTERS_H__ */
28 |
29 |
--------------------------------------------------------------------------------
/VML_Sample1/VML_Sample1.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cxx;cc;s;asm
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 |
22 |
23 | Source Files
24 |
25 |
26 |
--------------------------------------------------------------------------------
/VitaMonoLoader/VitaMonoLoader.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cxx;cc;s;asm
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 |
19 |
20 | Header Files
21 |
22 |
23 | Header Files
24 |
25 |
26 |
--------------------------------------------------------------------------------
/headers/mono/metadata/class-abi-details.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file Declarations of MonoClass field offset functions
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_CLASS_ABI_DETAILS_H__
7 | #define __MONO_METADATA_CLASS_ABI_DETAILS_H__
8 |
9 | #include
10 | #include
11 |
12 | #define MONO_CLASS_GETTER(funcname, rettype, optref, argtype, fieldname) /*nothing*/
13 | #ifdef MONO_CLASS_DEF_PRIVATE
14 | #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) intptr_t funcname (void);
15 | #else
16 | #define MONO_CLASS_OFFSET(funcname, argtype, fieldname) static inline intptr_t funcname (void) { return MONO_STRUCT_OFFSET (argtype, fieldname); }
17 | #endif
18 | #include "class-getters.h"
19 | #undef MONO_CLASS_GETTER
20 | #undef MONO_CLASS_OFFSET
21 |
22 | #endif /* __MONO_METADATA_CLASS_ABI_DETAILS_H__ */
23 |
24 |
--------------------------------------------------------------------------------
/headers/mono/metadata/threadpool-worker.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_THREADPOOL_WORKER_H
6 | #define _MONO_METADATA_THREADPOOL_WORKER_H
7 |
8 | #include
9 | #include
10 |
11 | #ifndef ENABLE_NETCORE
12 |
13 | typedef void (*MonoThreadPoolWorkerCallback)(void);
14 |
15 | void
16 | mono_threadpool_worker_init (MonoThreadPoolWorkerCallback callback);
17 |
18 | void
19 | mono_threadpool_worker_cleanup (void);
20 |
21 | void
22 | mono_threadpool_worker_request (void);
23 |
24 | gboolean
25 | mono_threadpool_worker_notify_completed (void);
26 |
27 | gint32
28 | mono_threadpool_worker_get_min (void);
29 | gboolean
30 | mono_threadpool_worker_set_min (gint32 value);
31 |
32 | gint32
33 | mono_threadpool_worker_get_max (void);
34 | gboolean
35 | mono_threadpool_worker_set_max (gint32 value);
36 |
37 | void
38 | mono_threadpool_worker_set_suspended (gboolean suspended);
39 |
40 | #endif /* ENABLE_NETCORE */
41 |
42 | #endif /* _MONO_METADATA_THREADPOOL_WORKER_H */
43 |
--------------------------------------------------------------------------------
/headers/mono/metadata/dynamic-stream-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_DYNAMIC_STREAM_INTERNALS_H__
7 | #define __MONO_METADATA_DYNAMIC_STREAM_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | void
13 | mono_dynstream_init (MonoDynamicStream *stream);
14 |
15 | guint32
16 | mono_dynstream_insert_string (MonoDynamicStream *sh, const char *str);
17 |
18 | guint32
19 | mono_dynstream_insert_mstring (MonoDynamicStream *sh, MonoString *str, MonoError *error);
20 |
21 | guint32
22 | mono_dynstream_add_data (MonoDynamicStream *stream, gconstpointer data, guint32 len);
23 |
24 | guint32
25 | mono_dynstream_add_zero (MonoDynamicStream *stream, guint32 len);
26 |
27 | void
28 | mono_dynstream_data_align (MonoDynamicStream *stream);
29 |
30 | #endif /* __MONO_METADATA_DYNAMIC_STREAM_INTERNALS_H__ */
31 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-x509-revoked.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-x509-revoked.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/23/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_x509_revoked__
10 | #define __btls__btls_x509_revoked__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509-crl.h"
15 |
16 | MONO_API MonoBtlsX509Revoked *
17 | mono_btls_x509_revoked_new (MonoBtlsX509Crl *owner, X509_REVOKED *revoked);
18 |
19 | MONO_API void
20 | mono_btls_x509_revoked_free (MonoBtlsX509Revoked *revoked);
21 |
22 | MONO_API int
23 | mono_btls_x509_revoked_get_serial_number (MonoBtlsX509Revoked *revoked, char *buffer, int size);
24 |
25 | MONO_API int64_t
26 | mono_btls_x509_revoked_get_revocation_date (MonoBtlsX509Revoked *revoked);
27 |
28 | MONO_API int
29 | mono_btls_x509_revoked_get_reason (MonoBtlsX509Revoked *revoked);
30 |
31 | MONO_API int
32 | mono_btls_x509_revoked_get_sequence (MonoBtlsX509Revoked *revoked);
33 |
34 | #endif /* __btls__btls_x509_revoked__ */
35 |
--------------------------------------------------------------------------------
/headers/mono/metadata/filewatcher.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * File System Watcher internal calls
4 | *
5 | * Authors:
6 | * Gonzalo Paniagua Javier (gonzalo@ximian.com)
7 | *
8 | * (C) 2004 Novell, Inc. (http://www.novell.com)
9 | */
10 |
11 | #ifndef _MONO_METADATA_FILEWATCHER_H
12 | #define _MONO_METADATA_FILEWATCHER_H
13 |
14 | #include
15 | #include "mono/utils/mono-compiler.h"
16 | #include
17 | #include
18 |
19 | #ifdef HAVE_UNISTD_H
20 | #include
21 | #endif
22 |
23 | #if !ENABLE_NETCORE
24 |
25 | ICALL_EXPORT
26 | gint ves_icall_System_IO_FSW_SupportsFSW (void);
27 |
28 | ICALL_EXPORT
29 | int ves_icall_System_IO_KqueueMonitor_kevent_notimeout (int *kq, gpointer changelist, int nchanges, gpointer eventlist, int nevents);
30 |
31 | #endif
32 |
33 | #ifdef HOST_IOS // This will obsoleted by System.Native as soon as it's ported to iOS
34 | MONO_API char* SystemNative_RealPath(const char* path);
35 | MONO_API void SystemNative_Sync (void);
36 | #endif
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/headers/mono/metadata/threadpool.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_THREADPOOL_H_
6 | #define _MONO_METADATA_THREADPOOL_H_
7 |
8 | #include
9 | #include
10 |
11 | #include
12 | #include
13 | #include
14 |
15 | void
16 | mono_threadpool_cleanup (void);
17 |
18 | MonoAsyncResult *
19 | mono_threadpool_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error);
20 | MonoObject *
21 | mono_threadpool_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error);
22 |
23 | gboolean
24 | mono_threadpool_remove_domain_jobs (MonoDomain *domain, int timeout);
25 |
26 | void
27 | mono_threadpool_suspend (void);
28 | void
29 | mono_threadpool_resume (void);
30 |
31 | /* Internals */
32 |
33 | gboolean
34 | mono_threadpool_enqueue_work_item (MonoDomain *domain, MonoObject *work_item, MonoError *error);
35 |
36 | #endif // _MONO_METADATA_THREADPOOL_H_
37 |
--------------------------------------------------------------------------------
/headers/mono/metadata/image-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2015 Xamarin Inc
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_IMAGE_INTERNALS_H__
7 | #define __MONO_METADATA_IMAGE_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | MonoImage*
13 | mono_image_loaded_internal (MonoAssemblyLoadContext *alc, const char *name, mono_bool refonly);
14 |
15 | MonoImage*
16 | mono_image_load_file_for_image_checked (MonoImage *image, int fileidx, MonoError *error);
17 |
18 | MonoImage*
19 | mono_image_load_module_checked (MonoImage *image, int idx, MonoError *error);
20 |
21 | MonoImage *
22 | mono_image_open_a_lot (MonoAssemblyLoadContext *alc, const char *fname, MonoImageOpenStatus *status, gboolean refonly, gboolean load_from_context);
23 |
24 | gboolean
25 | mono_is_problematic_image (MonoImage *image);
26 |
27 | gboolean
28 | mono_is_problematic_file (const char *fname);
29 |
30 | #endif /* __MONO_METADATA_IMAGE_INTERNALS_H__ */
31 |
--------------------------------------------------------------------------------
/headers/mono/native/pal-icalls.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * System.Native PAL internal calls
4 | * Adapter code between the Mono runtime and the CoreFX Platform Abstraction Layer (PAL)
5 | * Copyright 2018 Microsoft
6 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
7 | */
8 |
9 | #ifndef __MONO_METADATA_PAL_ICALLS_H__
10 | #define __MONO_METADATA_PAL_ICALLS_H__
11 |
12 | #include "mono/metadata/metadata.h"
13 | #include "mono/metadata/class-internals.h"
14 |
15 | MONO_API void mono_pal_init (void);
16 |
17 | extern void mono_marshal_set_last_error (void);
18 | extern int32_t SystemNative_Read(intptr_t fd, void* buffer, int32_t bufferSize);
19 | gint32 ves_icall_Interop_Sys_Read (intptr_t fd, gchar* buffer, gint32 count);
20 |
21 | #if defined(__APPLE__)
22 | extern void mono_thread_info_install_interrupt (void (*callback) (gpointer data), gpointer data, gboolean *interrupted);
23 | extern void mono_thread_info_uninstall_interrupt (gboolean *interrupted);
24 | void ves_icall_Interop_RunLoop_CFRunLoopRun (void);
25 | #endif
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/VMLVita2D/VMLVita2D.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cxx;cc;s;asm
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hpp
11 |
12 |
13 |
14 |
15 | Source Files
16 |
17 |
18 | Source Files
19 |
20 |
21 |
22 |
23 | Header Files
24 |
25 |
26 |
27 |
28 | Source Files
29 |
30 |
31 |
--------------------------------------------------------------------------------
/headers/mono/mini/mini-gc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_MINI_GC_H__
6 | #define __MONO_MINI_GC_H__
7 |
8 | #include "mini.h"
9 |
10 | /*
11 | * The GC type of a stack slot or register.
12 | * This can change through the method as follows:
13 | * - a SLOT_REF can become SLOT_NOREF and vice-versa when it becomes live/dead.
14 | * - a SLOT_PIN can become SLOT_REF after it has been definitely assigned.
15 | */
16 | typedef enum {
17 | /* Stack slot doesn't contain a reference */
18 | SLOT_NOREF = 0,
19 | /* Stack slot contains a reference */
20 | SLOT_REF = 1,
21 | /* No info or managed pointer, slot needs to be scanned conservatively */
22 | SLOT_PIN = 2
23 | } GCSlotType;
24 |
25 | void mini_gc_init (void);
26 |
27 | void mini_gc_init_cfg (MonoCompile *cfg);
28 |
29 | void mini_gc_enable_gc_maps_for_aot (void);
30 |
31 | void mini_gc_create_gc_map (MonoCompile *cfg);
32 |
33 | void mini_gc_set_slot_type_from_fp (MonoCompile *cfg, int slot_offset, GCSlotType type);
34 |
35 | void mini_gc_set_slot_type_from_cfa (MonoCompile *cfg, int slot_offset, GCSlotType type);
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/headers/mono/mini/tiered.h:
--------------------------------------------------------------------------------
1 | #ifdef ENABLE_EXPERIMENT_TIERED
2 |
3 | #ifndef __MONO_MINI_TIERED_H__
4 | #define __MONO_MINI_TIERED_H__
5 |
6 | #define TIERED_PATCH_KIND_INTERP 0
7 | #define TIERED_PATCH_KIND_JIT 1
8 | #define TIERED_PATCH_KIND_NUM 2
9 |
10 | typedef struct {
11 | int hotness;
12 | gboolean promoted;
13 | } MiniTieredCounter;
14 |
15 | typedef struct {
16 | gint64 methods_promoted;
17 | } MiniTieredStats;
18 |
19 | typedef struct {
20 | MonoDomain *domain;
21 | MonoMethod *target_method;
22 | int tier_level;
23 | } MiniTieredPatchPointContext;
24 |
25 | typedef gboolean (*CallsitePatcher)(MiniTieredPatchPointContext *context, gpointer patchsite);
26 |
27 | void
28 | mini_tiered_init (void);
29 |
30 | void
31 | mini_tiered_inc (MonoDomain *domain, MonoMethod *method, MiniTieredCounter *tcnt, int level);
32 |
33 | void
34 | mini_tiered_record_callsite (gpointer callsite, MonoMethod *target_method, int level);
35 |
36 | void
37 | mini_tiered_register_callsite_patcher (CallsitePatcher func, int level);
38 |
39 | #endif /* __MONO_MINI_TIERED_H__ */
40 | #endif /* ENABLE_EXPERIMENT_TIERED */
41 |
--------------------------------------------------------------------------------
/headers/mono/metadata/method-builder-ilgen-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2018 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METHOD_BUILDER_ILGEN_INTERNALS_H__
7 | #define __MONO_METHOD_BUILDER_ILGEN_INTERNALS_H__
8 |
9 | #include "config.h"
10 | #include
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 |
17 | /* ilgen version */
18 | struct _MonoMethodBuilder {
19 | MonoMethod *method;
20 | gchar *name;
21 | gboolean no_dup_name;
22 | GList *locals_list;
23 | gint locals;
24 | gboolean dynamic;
25 | gboolean skip_visibility;
26 | gboolean init_locals;
27 | guint32 code_size;
28 | guint32 pos;
29 | guchar *code;
30 | gint num_clauses;
31 | MonoExceptionClause *clauses;
32 | const gchar **param_names;
33 | MonoBitSet *volatile_args;
34 | MonoBitSet *volatile_locals;
35 | };
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/headers/mono/mini/mini-arch.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_MINI_ARCH_H__
6 | #define __MONO_MINI_ARCH_H__
7 |
8 | #ifdef TARGET_X86
9 | #include "mini-x86.h"
10 | #elif defined(TARGET_AMD64)
11 | #include "mini-amd64.h"
12 | #elif defined(TARGET_POWERPC)
13 | #include "mini-ppc.h"
14 | #elif defined(__sparc__) || defined(sparc)
15 | #include "mini-sparc.h"
16 | #elif defined(TARGET_S390X)
17 | # if defined(__s390x__)
18 | # include "mini-s390x.h"
19 | # else
20 | #error "s390 is no longer supported."
21 | # endif
22 | #elif defined(TARGET_ARM)
23 | #include "mini-arm.h"
24 | #elif defined(TARGET_ARM64)
25 | #include "mini-arm64.h"
26 | #elif defined(__mips__)
27 | #include "mini-mips.h"
28 | #elif defined (TARGET_RISCV)
29 | #include "mini-riscv.h"
30 | #elif TARGET_WASM
31 | #include "mini-wasm.h"
32 | #else
33 | #error add arch specific include file in mini-arch.h
34 | #endif
35 |
36 | #if (MONO_ARCH_FRAME_ALIGNMENT == 4)
37 | #define MONO_ARCH_LOCALLOC_ALIGNMENT 8
38 | #else
39 | #define MONO_ARCH_LOCALLOC_ALIGNMENT MONO_ARCH_FRAME_ALIGNMENT
40 | #endif
41 |
42 | #endif /* __MONO_MINI_ARCH_H__ */
43 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-conc-hash.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * GC-aware concurrent hashtable, based on utils/mono-conc-hashtable
4 | */
5 |
6 | #ifndef __MONO_CONC_G_HASH_H__
7 | #define __MONO_CONC_G_HASH_H__
8 |
9 | #include
10 |
11 |
12 | typedef struct _MonoConcGHashTable MonoConcGHashTable;
13 |
14 | MonoConcGHashTable * mono_conc_g_hash_table_new_type (GHashFunc hash_func, GEqualFunc key_equal_func, MonoGHashGCType type, MonoGCRootSource source, void *key, const char *msg);
15 | gpointer mono_conc_g_hash_table_lookup (MonoConcGHashTable *hash, gconstpointer key);
16 | gboolean mono_conc_g_hash_table_lookup_extended (MonoConcGHashTable *hash, gconstpointer key, gpointer *orig_key, gpointer *value);
17 | void mono_conc_g_hash_table_foreach (MonoConcGHashTable *hash, GHFunc func, gpointer user_data);
18 | void mono_conc_g_hash_table_destroy (MonoConcGHashTable *hash);
19 | gpointer mono_conc_g_hash_table_insert (MonoConcGHashTable *h, gpointer k, gpointer v);
20 | gpointer mono_conc_g_hash_table_remove (MonoConcGHashTable *hash, gconstpointer key);
21 |
22 | #endif /* __MONO_CONC_G_HASH_H__ */
23 |
--------------------------------------------------------------------------------
/headers/mono/mini/seq-points.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2014 Xamarin Inc
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 |
7 | #ifndef __MONO_SEQ_POINTS_H__
8 | #define __MONO_SEQ_POINTS_H__
9 |
10 | #include
11 |
12 | void
13 | mono_save_seq_point_info (MonoCompile *cfg, MonoJitInfo *jinfo);
14 |
15 | MonoSeqPointInfo*
16 | mono_get_seq_points (MonoDomain *domain, MonoMethod *method);
17 |
18 | gboolean
19 | mono_find_next_seq_point_for_native_offset (MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
20 |
21 | gboolean
22 | mono_find_prev_seq_point_for_native_offset (MonoDomain *domain, MonoMethod *method, gint32 native_offset, MonoSeqPointInfo **info, SeqPoint* seq_point);
23 |
24 | gboolean
25 | mono_find_seq_point (MonoDomain *domain, MonoMethod *method, gint32 il_offset, MonoSeqPointInfo **info, SeqPoint *seq_point);
26 |
27 | void
28 | mono_bb_deduplicate_op_il_seq_points (MonoCompile *cfg, MonoBasicBlock *bb);
29 |
30 | #endif /* __MONO_SEQ_POINTS_H__ */
31 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-basic-block.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_METADATA_BASIC_BLOCK_H__
6 | #define __MONO_METADATA_BASIC_BLOCK_H__
7 |
8 | #include
9 | #include
10 | #include
11 | #include
12 | #include
13 |
14 | typedef struct _MonoSimpleBasicBlock MonoSimpleBasicBlock;
15 |
16 | struct _MonoSimpleBasicBlock {
17 | MonoSimpleBasicBlock *next, *left, *right, *parent;
18 | GSList *out_bb;
19 | int start, end;
20 | unsigned colour : 1;
21 | unsigned dead : 1;
22 | };
23 |
24 | MonoSimpleBasicBlock*
25 | mono_basic_block_split (MonoMethod *method, MonoError *error, MonoMethodHeader *header);
26 |
27 | void
28 | mono_basic_block_free (MonoSimpleBasicBlock *bb);
29 |
30 | /*This function is here because opcodes.h is a public header*/
31 | int
32 | mono_opcode_value_and_size (const unsigned char **ip, const unsigned char *end, MonoOpcodeEnum *value);
33 |
34 | int
35 | mono_opcode_size (const unsigned char *ip, const unsigned char *end);
36 |
37 | #endif /* __MONO_METADATA_BASIC_BLOCK_H__ */
38 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-x509-lookup-mono.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-x509-lookup-mono.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/3/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_x509_lookup_mono__
10 | #define __btls__btls_x509_lookup_mono__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509.h"
15 | #include "btls-x509-store.h"
16 |
17 | typedef int (* MonoBtlsX509LookupMono_BySubject) (const void *instance, MonoBtlsX509Name *name, X509 **ret);
18 |
19 | MONO_API MonoBtlsX509LookupMono *
20 | mono_btls_x509_lookup_mono_new (void);
21 |
22 | MONO_API int
23 | mono_btls_x509_lookup_mono_free (MonoBtlsX509LookupMono *mono);
24 |
25 | MONO_API void
26 | mono_btls_x509_lookup_mono_init (MonoBtlsX509LookupMono *mono, const void *instance,
27 | MonoBtlsX509LookupMono_BySubject by_subject_func);
28 |
29 | MONO_API int
30 | mono_btls_x509_lookup_add_mono (MonoBtlsX509Lookup *lookup, MonoBtlsX509LookupMono *mono);
31 |
32 | MONO_API X509_LOOKUP_METHOD *
33 | mono_btls_x509_lookup_mono_method (void);
34 |
35 | #endif /* defined(__btls__btls_x509_lookup_mono__) */
36 |
37 |
--------------------------------------------------------------------------------
/headers/mono/native/mono-native-platform.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include "mono/utils/mono-publib.h"
4 |
5 | // Keep in sync with mcs/class/corlib/Test/Mono/MonoNativePlatformType.cs
6 |
7 | typedef enum {
8 | MONO_NATIVE_PLATFORM_TYPE_UNKNOWN = 0,
9 | MONO_NATIVE_PLATFORM_TYPE_MACOS = 1,
10 | MONO_NATIVE_PLATFORM_TYPE_IOS = 2,
11 | MONO_NATIVE_PLATFORM_TYPE_LINUX = 3,
12 | MONO_NATIVE_PLATFORM_TYPE_AIX = 4,
13 | MONO_NATIVE_PLATFORM_TYPE_ANDROID = 5,
14 | MONO_NATIVE_PLATFORM_TYPE_FREEBSD = 6,
15 | MONO_NATIVE_PLATFORM_TYPE_HAIKU = 7,
16 | MONO_NATIVE_PLATFORM_TYPE_NETBSD = 8,
17 |
18 | MONO_NATIVE_PLATFORM_TYPE_IPHONE = 0x100,
19 | MONO_NATIVE_PLATFORM_TYPE_TV = 0x200,
20 | MONO_NATIVE_PLATFORM_TYPE_WATCH = 0x400,
21 |
22 | MONO_NATIVE_PLATFORM_TYPE_COMPAT = 0x1000,
23 | MONO_NATIVE_PLATFORM_TYPE_UNIFIED = 0x2000,
24 |
25 | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR = 0x4000,
26 | MONO_NATIVE_PLATFORM_TYPE_DEVICE = 0x8000
27 | } MonoNativePlatformType;
28 |
29 | MONO_API int32_t
30 | mono_native_get_platform_type (void);
31 |
32 | MONO_API int32_t
33 | mono_native_is_initialized (void);
34 |
35 | MONO_API void
36 | mono_native_initialize (void);
37 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-jemalloc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * Header for jemalloc registration code
5 | */
6 |
7 | #ifndef __MONO_JEMALLOC_H__
8 | #define __MONO_JEMALLOC_H__
9 |
10 | #if defined(MONO_JEMALLOC_ENABLED)
11 |
12 | #include
13 |
14 | /* Jemalloc can be configured in three ways.
15 | * 1. You can use it with library loading hacks at run-time
16 | * 2. You can use it as a global malloc replacement
17 | * 3. You can use it with a prefix. If you use it with a prefix, you have to explicitly name the malloc function.
18 | *
19 | * In order to make this feature able to be toggled at run-time, I chose to use a prefix of mono_je.
20 | * This mapping is captured below in the header, in the spirit of "no magic constants".
21 | *
22 | * The place that configures jemalloc and sets this prefix is in the Makefile in
23 | * mono/jemalloc/Makefile.am
24 | *
25 | */
26 | #define MONO_JEMALLOC_MALLOC mono_jemalloc
27 | #define MONO_JEMALLOC_REALLOC mono_jerealloc
28 | #define MONO_JEMALLOC_FREE mono_jefree
29 | #define MONO_JEMALLOC_CALLOC mono_jecalloc
30 |
31 | void mono_init_jemalloc (void);
32 |
33 | #endif
34 |
35 | #endif
36 |
37 |
--------------------------------------------------------------------------------
/headers/mono/metadata/w32event.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_W32EVENT_H_
6 | #define _MONO_METADATA_W32EVENT_H_
7 |
8 | #include
9 | #include
10 |
11 | #include "object.h"
12 | #include "object-internals.h"
13 | #include "w32handle-namespace.h"
14 | #include
15 |
16 | void
17 | mono_w32event_init (void);
18 |
19 | gpointer
20 | mono_w32event_create (gboolean manual, gboolean initial);
21 |
22 | gboolean
23 | mono_w32event_close (gpointer handle);
24 |
25 | void
26 | mono_w32event_set (gpointer handle);
27 |
28 | void
29 | mono_w32event_reset (gpointer handle);
30 |
31 | ICALL_EXPORT
32 | gboolean
33 | ves_icall_System_Threading_Events_SetEvent_internal (gpointer handle);
34 |
35 | ICALL_EXPORT
36 | gboolean
37 | ves_icall_System_Threading_Events_ResetEvent_internal (gpointer handle);
38 |
39 | ICALL_EXPORT
40 | void
41 | ves_icall_System_Threading_Events_CloseEvent_internal (gpointer handle);
42 |
43 | typedef struct MonoW32HandleNamedEvent MonoW32HandleNamedEvent;
44 |
45 | MonoW32HandleNamespace*
46 | mono_w32event_get_namespace (MonoW32HandleNamedEvent *event);
47 |
48 | #endif /* _MONO_METADATA_W32EVENT_H_ */
49 |
--------------------------------------------------------------------------------
/headers/mono/mini/interp/interp.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_MINI_INTERPRETER_H__
6 | #define __MONO_MINI_INTERPRETER_H__
7 | #include
8 |
9 | #ifdef TARGET_WASM
10 | #define INTERP_ICALL_TRAMP_IARGS 12
11 | #define INTERP_ICALL_TRAMP_FARGS 12
12 | #else
13 | #define INTERP_ICALL_TRAMP_IARGS 12
14 | #define INTERP_ICALL_TRAMP_FARGS 4
15 | #endif
16 |
17 | struct _InterpMethodArguments {
18 | size_t ilen;
19 | gpointer *iargs;
20 | size_t flen;
21 | double *fargs;
22 | gpointer *retval;
23 | size_t is_float_ret;
24 | #ifdef TARGET_WASM
25 | MonoMethodSignature *sig;
26 | #endif
27 | };
28 |
29 | enum {
30 | INTERP_OPT_NONE = 0,
31 | INTERP_OPT_INLINE = 1,
32 | INTERP_OPT_CPROP = 2,
33 | INTERP_OPT_SUPER_INSTRUCTIONS = 4,
34 | INTERP_OPT_DEFAULT = INTERP_OPT_INLINE | INTERP_OPT_CPROP | INTERP_OPT_SUPER_INSTRUCTIONS
35 | };
36 |
37 | typedef struct _InterpMethodArguments InterpMethodArguments;
38 |
39 | /* must be called either
40 | * - by mini_init ()
41 | * - xor, before mini_init () is called (embedding scenario).
42 | */
43 | MONO_API void mono_ee_interp_init (const char *);
44 |
45 | #endif /* __MONO_MINI_INTERPRETER_H__ */
46 |
--------------------------------------------------------------------------------
/headers/mono/metadata/fdhandle.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef __MONO_METADATA_FDHANDLE_H__
3 | #define __MONO_METADATA_FDHANDLE_H__
4 |
5 | #include
6 | #include
7 |
8 | #include "utils/refcount.h"
9 |
10 | typedef enum {
11 | MONO_FDTYPE_FILE,
12 | MONO_FDTYPE_CONSOLE,
13 | MONO_FDTYPE_PIPE,
14 | MONO_FDTYPE_SOCKET,
15 | MONO_FDTYPE_COUNT
16 | } MonoFDType;
17 |
18 | typedef struct {
19 | MonoRefCount ref;
20 | MonoFDType type;
21 | gint fd;
22 | } MonoFDHandle;
23 |
24 | typedef struct {
25 | void (*close) (MonoFDHandle *fdhandle);
26 | void (*destroy) (MonoFDHandle *fdhandle);
27 | } MonoFDHandleCallback;
28 |
29 | void
30 | mono_fdhandle_register (MonoFDType type, MonoFDHandleCallback *callback);
31 |
32 | void
33 | mono_fdhandle_init (MonoFDHandle *fdhandle, MonoFDType type, gint fd);
34 |
35 | void
36 | mono_fdhandle_insert (MonoFDHandle *fdhandle);
37 |
38 | gboolean
39 | mono_fdhandle_try_insert (MonoFDHandle *fdhandle);
40 |
41 | gboolean
42 | mono_fdhandle_lookup_and_ref (gint fd, MonoFDHandle **fdhandle);
43 |
44 | void
45 | mono_fdhandle_unref (MonoFDHandle *fdhandle);
46 |
47 | gboolean
48 | mono_fdhandle_close (gint fd);
49 |
50 | #endif /* __MONO_METADATA_FDHANDLE_H__ */
51 |
--------------------------------------------------------------------------------
/headers/mono/metadata/marshal-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_MARSHAL_INTERNALS_H__
7 | #define __MONO_METADATA_MARSHAL_INTERNALS_H__
8 |
9 | #include
10 | #include
11 | #include
12 |
13 | MonoObjectHandle
14 | mono_marshal_xdomain_copy_value_handle (MonoObjectHandle val, MonoError *error);
15 |
16 | void*
17 | mono_marshal_alloc_co_task_mem (size_t size);
18 |
19 | void
20 | mono_marshal_free_co_task_mem (void *ptr);
21 |
22 | gpointer
23 | mono_marshal_realloc_co_task_mem (gpointer ptr, size_t size);
24 |
25 | void
26 | mono_marshal_free_hglobal (void *ptr);
27 |
28 | gpointer
29 | mono_marshal_realloc_hglobal (gpointer ptr, size_t size);
30 |
31 | void*
32 | mono_marshal_alloc_hglobal (size_t size);
33 |
34 | void*
35 | mono_marshal_alloc_hglobal_error (gsize size, MonoError*);
36 |
37 | typedef enum {
38 | TYPECHECK_OBJECT_ARG_POS = 0,
39 | TYPECHECK_CLASS_ARG_POS = 1,
40 | TYPECHECK_CACHE_ARG_POS = 2
41 | } MarshalTypeCheckPositions;
42 |
43 | #endif /* __MONO_METADATA_MARSHAL_INTERNALS_H__ */
44 |
--------------------------------------------------------------------------------
/headers/mono/metadata/callspec.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_CALLSPEC_H__
6 | #define __MONO_CALLSPEC_H__
7 | #include
8 | #include
9 |
10 | typedef enum {
11 | MONO_TRACEOP_ALL,
12 | MONO_TRACEOP_PROGRAM,
13 | MONO_TRACEOP_METHOD,
14 | MONO_TRACEOP_ASSEMBLY,
15 | MONO_TRACEOP_CLASS,
16 | MONO_TRACEOP_NAMESPACE,
17 | MONO_TRACEOP_EXCEPTION,
18 | MONO_TRACEOP_WRAPPER,
19 | } MonoTraceOpcode;
20 |
21 | typedef struct {
22 | MonoTraceOpcode op;
23 | int exclude;
24 | void *data, *data2;
25 | } MonoTraceOperation;
26 |
27 | typedef struct {
28 | int len;
29 | gboolean enabled;
30 | MonoTraceOperation *ops;
31 | } MonoCallSpec;
32 |
33 | MONO_PROFILER_API gboolean mono_callspec_parse (const char *options,
34 | MonoCallSpec *spec,
35 | char **errstr);
36 | MONO_PROFILER_API void mono_callspec_cleanup (MonoCallSpec *spec);
37 | MONO_PROFILER_API gboolean mono_callspec_eval_exception (MonoClass *klass,
38 | MonoCallSpec *spec);
39 | MONO_PROFILER_API gboolean mono_callspec_eval (MonoMethod *method,
40 | const MonoCallSpec *spec);
41 | void mono_callspec_set_assembly (MonoAssembly *assembly);
42 |
43 | #endif /* __MONO_CALLSPEC_H__ */
44 |
--------------------------------------------------------------------------------
/headers/mono/metadata/remoting.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Remoting support
4 | *
5 | * (C) 2014 Xamarin, Inc. http://www.xamarin.com
6 | *
7 | */
8 |
9 | #ifndef __MONO_REMOTING_H__
10 | #define __MONO_REMOTING_H__
11 |
12 | #include "config.h"
13 | #include
14 | #include
15 | #include
16 |
17 | void mono_remoting_init (void);
18 |
19 | #ifndef DISABLE_REMOTING
20 |
21 | MonoMethod *
22 | mono_marshal_get_remoting_invoke (MonoMethod *method, MonoError *error);
23 |
24 | MonoMethod *
25 | mono_marshal_get_xappdomain_invoke (MonoMethod *method, MonoError *error);
26 |
27 | MonoMethod *
28 | mono_marshal_get_remoting_invoke_for_target (MonoMethod *method, MonoRemotingTarget target_type, MonoError *error);
29 |
30 | MonoMethod *
31 | mono_marshal_get_remoting_invoke_with_check (MonoMethod *method, MonoError *error);
32 |
33 | MonoMethod *
34 | mono_marshal_get_stfld_wrapper (MonoType *type);
35 |
36 | MonoMethod *
37 | mono_marshal_get_ldfld_wrapper (MonoType *type);
38 |
39 | MonoMethod *
40 | mono_marshal_get_ldflda_wrapper (MonoType *type);
41 |
42 | MonoMethod *
43 | mono_marshal_get_proxy_cancast (MonoClass *klass);
44 |
45 | #endif
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-x509-chain.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-x509-chain.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/3/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_x509_chain__
10 | #define __btls__btls_x509_chain__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509.h"
15 |
16 | MONO_API MonoBtlsX509Chain *
17 | mono_btls_x509_chain_new (void);
18 |
19 | MONO_API MonoBtlsX509Chain *
20 | mono_btls_x509_chain_from_certs (STACK_OF(X509) *certs);
21 |
22 | MONO_API STACK_OF(X509) *
23 | mono_btls_x509_chain_peek_certs (MonoBtlsX509Chain *chain);
24 |
25 | MONO_API int
26 | mono_btls_x509_chain_get_count (MonoBtlsX509Chain *chain);
27 |
28 | MONO_API X509 *
29 | mono_btls_x509_chain_get_cert (MonoBtlsX509Chain *chain, int index);
30 |
31 | MONO_API STACK_OF(X509) *
32 | mono_btls_x509_chain_get_certs (MonoBtlsX509Chain *chain);
33 |
34 | MONO_API MonoBtlsX509Chain *
35 | mono_btls_x509_chain_up_ref (MonoBtlsX509Chain *chain);
36 |
37 | MONO_API int
38 | mono_btls_x509_chain_free (MonoBtlsX509Chain *chain);
39 |
40 | MONO_API void
41 | mono_btls_x509_chain_add_cert (MonoBtlsX509Chain *chain, X509 *x509);
42 |
43 | #endif /* defined(__btls__btls_x509_chain__) */
44 |
45 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-security-windows-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_MONO_SECURITY_WINDOWS_INTERNALS_H__
7 | #define __MONO_METADATA_MONO_SECURITY_WINDOWS_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | #ifdef HOST_WIN32
13 | #include "mono/metadata/security.h"
14 | #include "mono/metadata/object.h"
15 | #include "mono/metadata/object-internals.h"
16 | #include "mono/metadata/metadata.h"
17 | #include "mono/metadata/metadata-internals.h"
18 |
19 | gint32
20 | mono_security_win_get_token_name (gpointer token, gunichar2 ** uniname, MonoError *error);
21 |
22 | gboolean
23 | mono_security_win_is_machine_protected (const gunichar2 *path, MonoError *error);
24 |
25 | gboolean
26 | mono_security_win_is_user_protected (const gunichar2 *path, MonoError *error);
27 |
28 | gboolean
29 | mono_security_win_protect_machine (const gunichar2 *path, MonoError *error);
30 |
31 | gboolean
32 | mono_security_win_protect_user (const gunichar2 *path, MonoError *error);
33 |
34 | #endif /* HOST_WIN32 */
35 |
36 | #endif /* __MONO_METADATA_MONO_SECURITY_WINDOWS_INTERNALS_H__ */
37 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mempool.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_MEMPOOL_H_
6 | #define _MONO_MEMPOOL_H_
7 |
8 | #include
9 |
10 | typedef struct _MonoMemPool MonoMemPool;
11 |
12 | MONO_API MonoMemPool *
13 | mono_mempool_new (void);
14 |
15 | MONO_API MonoMemPool *
16 | mono_mempool_new_size (int initial_size);
17 |
18 | MONO_API void
19 | mono_mempool_destroy (MonoMemPool *pool);
20 |
21 | MONO_API void
22 | mono_mempool_invalidate (MonoMemPool *pool);
23 |
24 | MONO_API void
25 | mono_mempool_stats (MonoMemPool *pool);
26 |
27 | MONO_API void*
28 | mono_mempool_alloc (MonoMemPool *pool, unsigned int size);
29 |
30 | #define mono_mempool_alloc(pool, size) (g_cast (mono_mempool_alloc ((pool), (size))))
31 |
32 | MONO_API void*
33 | mono_mempool_alloc0 (MonoMemPool *pool, unsigned int size);
34 |
35 | #define mono_mempool_alloc0(pool, size) (g_cast (mono_mempool_alloc0 ((pool), (size))))
36 |
37 | MONO_API mono_bool
38 | mono_mempool_contains_addr (MonoMemPool *pool, void* addr);
39 |
40 | MONO_API char*
41 | mono_mempool_strdup (MonoMemPool *pool, const char *s);
42 |
43 | MONO_API uint32_t
44 | mono_mempool_get_allocated (MonoMemPool *pool);
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/headers/mono/metadata/coree-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_COREE_INTERNALS_H__
7 | #define __MONO_COREE_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | #ifdef HOST_WIN32
13 | #include
14 |
15 | BOOL STDMETHODCALLTYPE
16 | _CorDllMain (HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved);
17 |
18 | __int32 STDMETHODCALLTYPE
19 | _CorExeMain (void);
20 |
21 | void STDMETHODCALLTYPE
22 | CorExitProcess (int exitCode);
23 |
24 | STDAPI
25 | _CorValidateImage (PVOID *ImageBase, LPCWSTR FileName);
26 |
27 | STDAPI_(VOID)
28 | _CorImageUnloading (PVOID ImageBase);
29 |
30 | STDAPI
31 | CorBindToRuntimeEx (LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor,
32 | DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv);
33 |
34 | STDAPI
35 | CorBindToRuntime (LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor,
36 | REFCLSID rclsid, REFIID riid, LPVOID FAR *ppv);
37 |
38 | HMODULE WINAPI
39 | MonoLoadImage (LPCWSTR FileName);
40 |
41 | void mono_coree_set_act_ctx (const char *file_name);
42 | #endif /* HOST_WIN32 */
43 |
44 | #endif /* __MONO_COREE_INTERNALS_H__ */
45 |
46 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-config.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | *
4 | * Author: Paolo Molaro (lupus@ximian.com)
5 | *
6 | * (C) 2002 Ximian, Inc.
7 | */
8 | #ifndef __MONO_METADATA_CONFIG_H__
9 | #define __MONO_METADATA_CONFIG_H__
10 |
11 | #include
12 | #include
13 |
14 | MONO_BEGIN_DECLS
15 |
16 | MONO_API const char *mono_config_get_os (void);
17 | MONO_API const char *mono_config_get_cpu (void);
18 | MONO_API const char *mono_config_get_wordsize (void);
19 |
20 | MONO_API const char* mono_get_config_dir (void);
21 | MONO_API void mono_set_config_dir (const char *dir);
22 |
23 | MONO_API const char* mono_get_machine_config (void);
24 |
25 | MONO_API void mono_config_cleanup (void);
26 | MONO_API void mono_config_parse (const char *filename);
27 | MONO_API MONO_RT_EXTERNAL_ONLY void mono_config_for_assembly (MonoImage *assembly);
28 | MONO_API void mono_config_parse_memory (const char *buffer);
29 |
30 | MONO_API const char* mono_config_string_for_assembly_file (const char *filename);
31 |
32 | MONO_API void mono_config_set_server_mode (mono_bool server_mode);
33 | MONO_API mono_bool mono_config_is_server_mode (void);
34 |
35 | MONO_END_DECLS
36 |
37 | #endif /* __MONO_METADATA_CONFIG_H__ */
38 |
39 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-property-hash.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Hash table for (object, property) pairs
4 | *
5 | * Author:
6 | * Zoltan Varga (vargaz@gmail.com)
7 | *
8 | * (C) 2008 Novell, Inc
9 | */
10 |
11 | /*
12 | * This is similar to the GLib hash table, but stores (object, property) pairs. It can
13 | * be used to store rarely used fields of runtime structures, decreasing memory usage.
14 | * The memory required to store one property is the size of one hash node, about 3
15 | * pointers.
16 | */
17 |
18 | #ifndef _MONO_PROPERTY_HASH_H_
19 | #define _MONO_PROPERTY_HASH_H_
20 |
21 | #include
22 | #include
23 |
24 | typedef struct _MonoPropertyHash MonoPropertyHash;
25 |
26 | MONO_API MonoPropertyHash* mono_property_hash_new (void);
27 |
28 | MONO_API void mono_property_hash_destroy (MonoPropertyHash *hash);
29 |
30 | MONO_API void mono_property_hash_insert (MonoPropertyHash *hash, gpointer object, guint32 property,
31 | gpointer value);
32 |
33 | /* Remove all properties of OBJECT */
34 | MONO_API void mono_property_hash_remove_object (MonoPropertyHash *hash, gpointer object);
35 |
36 | MONO_API gpointer mono_property_hash_lookup (MonoPropertyHash *hash, gpointer object, guint32 property);
37 |
38 | #endif
39 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-pkcs12.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-pkcs12.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/8/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_pkcs12__
10 | #define __btls__btls_pkcs12__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509.h"
15 |
16 | MONO_API MonoBtlsPkcs12 *
17 | mono_btls_pkcs12_new (void);
18 |
19 | MONO_API int
20 | mono_btls_pkcs12_get_count (MonoBtlsPkcs12 *pkcs12);
21 |
22 | MONO_API X509 *
23 | mono_btls_pkcs12_get_cert (MonoBtlsPkcs12 *pkcs12, int index);
24 |
25 | MONO_API STACK_OF(X509) *
26 | mono_btls_pkcs12_get_certs (MonoBtlsPkcs12 *pkcs12);
27 |
28 | MONO_API int
29 | mono_btls_pkcs12_free (MonoBtlsPkcs12 *pkcs12);
30 |
31 | MONO_API MonoBtlsPkcs12 *
32 | mono_btls_pkcs12_up_ref (MonoBtlsPkcs12 *pkcs12);
33 |
34 | MONO_API void
35 | mono_btls_pkcs12_add_cert (MonoBtlsPkcs12 *pkcs12, X509 *x509);
36 |
37 | MONO_API int
38 | mono_btls_pkcs12_import (MonoBtlsPkcs12 *pkcs12, const void *data, int len, const void *password);
39 |
40 | MONO_API int
41 | mono_btls_pkcs12_has_private_key (MonoBtlsPkcs12 *pkcs12);
42 |
43 | MONO_API EVP_PKEY *
44 | mono_btls_pkcs12_get_private_key (MonoBtlsPkcs12 *pkcs12);
45 |
46 | #endif /* __btls__btls_pkcs12__ */
47 |
--------------------------------------------------------------------------------
/headers/mono/mini/regalloc.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | typedef size_t regmask_t;
6 |
7 | enum {
8 | MONO_REG_INT,
9 | MONO_REG_DOUBLE,
10 | /* This is used only for allocating spill slots with GC tracking */
11 | MONO_REG_INT_REF,
12 | /* Ditto for managed pointers */
13 | MONO_REG_INT_MP,
14 | MONO_REG_SIMD
15 | };
16 |
17 |
18 | #ifdef MONO_ARCH_NEED_SIMD_BANK
19 | #define MONO_NUM_REGBANKS 5
20 | #else
21 | #define MONO_NUM_REGBANKS 4
22 | #endif
23 |
24 | typedef struct {
25 | /* symbolic registers */
26 | int next_vreg;
27 |
28 | regmask_t ifree_mask;
29 | regmask_t free_mask [MONO_NUM_REGBANKS];
30 |
31 | /* symbolic -> hard register assignment */
32 | /*
33 | * If the register is spilled, then this contains -spill - 1, where 'spill'
34 | * is the index of the spill variable.
35 | */
36 | gint32 *vassign;
37 |
38 | /* hard -> symbolic */
39 | int isymbolic [MONO_MAX_IREGS];
40 | int fsymbolic [MONO_MAX_FREGS];
41 | #ifdef MONO_ARCH_NEED_SIMD_BANK
42 | int xsymbolic [MONO_MAX_XREGS];
43 | #endif
44 | /* Points to the arrays above */
45 | int *symbolic [MONO_NUM_REGBANKS];
46 |
47 | int vassign_size;
48 | } MonoRegState;
49 |
50 | MonoRegState* mono_regstate_new (void);
51 |
52 | void mono_regstate_free (MonoRegState *rs);
53 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-threads-debug.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_MONO_THREADS_DEBUG_H__
6 | #define __MONO_UTILS_MONO_THREADS_DEBUG_H__
7 |
8 | #include
9 | #include
10 |
11 | /* Logging - enable them below if you need specific logging for the category you need */
12 | #define MOSTLY_ASYNC_SAFE_FPRINTF(handle, ...) do { \
13 | g_async_safe_fprintf (handle, __VA_ARGS__); \
14 | } while (0)
15 |
16 | #define MOSTLY_ASYNC_SAFE_PRINTF(...) MOSTLY_ASYNC_SAFE_FPRINTF(1, __VA_ARGS__);
17 |
18 | #if 1
19 | #define THREADS_DEBUG(...)
20 | #else
21 | #define THREADS_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
22 | #endif
23 |
24 | #if 1
25 | #define THREADS_STW_DEBUG(...)
26 | #else
27 | #define THREADS_STW_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
28 | #endif
29 |
30 | #if 1
31 | #define THREADS_SUSPEND_DEBUG(...)
32 | #else
33 | #define THREADS_SUSPEND_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
34 | #endif
35 |
36 | #if 1
37 | #define THREADS_STATE_MACHINE_DEBUG(...)
38 | #else
39 | #define THREADS_STATE_MACHINE_DEBUG_ENABLED
40 | #define THREADS_STATE_MACHINE_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
41 | #endif
42 |
43 | #if 1
44 | #define THREADS_INTERRUPT_DEBUG(...)
45 | #else
46 | #define THREADS_INTERRUPT_DEBUG MOSTLY_ASYNC_SAFE_PRINTF
47 | #endif
48 |
49 | #endif /* __MONO_UTILS_MONO_THREADS_DEBUG_H__ */
50 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-poll.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef MONO_POLL_H
6 | #define MONO_POLL_H
7 |
8 | #include
9 |
10 | #include
11 | #ifdef HAVE_SYS_TIME_H
12 | #include
13 | #endif
14 | #include
15 | #ifdef HAVE_UNISTD_H
16 | #include
17 | #endif
18 |
19 | #ifdef HAVE_POLL
20 | #ifdef HAVE_POLL_H
21 | #include
22 | #elif defined(HAVE_SYS_POLL_H)
23 | #include
24 | #endif
25 |
26 | #define MONO_POLLIN POLLIN
27 | #define MONO_POLLPRI POLLPRI
28 | #define MONO_POLLOUT POLLOUT
29 | #define MONO_POLLERR POLLERR
30 | #define MONO_POLLHUP POLLHUP
31 | #define MONO_POLLNVAL POLLNVAL
32 |
33 | typedef struct pollfd mono_pollfd;
34 |
35 | #else
36 |
37 | #ifdef HOST_WIN32
38 | #include
39 | #endif
40 | #define MONO_POLLIN 1
41 | #define MONO_POLLPRI 2
42 | #define MONO_POLLOUT 4
43 | #define MONO_POLLERR 8
44 | #define MONO_POLLHUP 0x10
45 | #define MONO_POLLNVAL 0x20
46 |
47 | typedef struct {
48 | int fd;
49 | short events;
50 | short revents;
51 | } mono_pollfd;
52 |
53 | #endif
54 |
55 | int
56 | mono_poll_can_add (mono_pollfd *ufds, unsigned int nfds, int fd);
57 |
58 | MONO_API int mono_poll (mono_pollfd *ufds, unsigned int nfds, int timeout);
59 |
60 | #endif /* MONO_POLL_H */
61 |
62 |
--------------------------------------------------------------------------------
/headers/mono/utils/json.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * JSON writer
4 | *
5 | * Author:
6 | * Joao Matos (joao.matos@xamarin.com)
7 | *
8 | * Copyright 2015 Xamarin Inc (http://www.xamarin.com)
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #ifndef __MONO_UTILS_JSON_H__
13 | #define __MONO_UTILS_JSON_H__
14 |
15 | #include
16 |
17 | #define JSON_INDENT_VALUE 2
18 |
19 | typedef struct JsonWriter {
20 | GString* text;
21 | int indent;
22 | } JsonWriter;
23 |
24 | void mono_json_writer_init (JsonWriter* writer);
25 | void mono_json_writer_destroy (JsonWriter* writer);
26 | void mono_json_writer_indent(JsonWriter* writer);
27 | void mono_json_writer_indent_push(JsonWriter* writer);
28 | void mono_json_writer_indent_pop(JsonWriter* writer);
29 | void mono_json_writer_vprintf(JsonWriter* writer, const gchar *format, va_list args);
30 | void mono_json_writer_printf(JsonWriter* writer, const gchar *format, ...);
31 | void mono_json_writer_array_begin(JsonWriter* writer);
32 | void mono_json_writer_array_end(JsonWriter* writer);
33 | void mono_json_writer_object_begin(JsonWriter* writer);
34 | void mono_json_writer_object_end(JsonWriter* writer);
35 | void mono_json_writer_object_key(JsonWriter* writer, const gchar* format, ...);
36 |
37 | #endif
38 |
--------------------------------------------------------------------------------
/headers/mono/sgen/sgen-pointer-queue.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * A pointer queue that can be sorted.
4 | *
5 | * Copyright (C) 2014 Xamarin Inc
6 | *
7 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 | */
9 |
10 | #ifndef __MONO_SGEN_POINTER_QUEUE_H__
11 | #define __MONO_SGEN_POINTER_QUEUE_H__
12 |
13 | #include
14 |
15 | typedef struct {
16 | void **data;
17 | size_t size;
18 | size_t next_slot;
19 | int mem_type;
20 | } SgenPointerQueue;
21 |
22 | #define SGEN_POINTER_QUEUE_INIT(mem_type) { NULL, 0, 0, (mem_type) }
23 |
24 | void sgen_pointer_queue_add (SgenPointerQueue *queue, void *ptr);
25 | void sgen_pointer_queue_clear (SgenPointerQueue *queue);
26 | void sgen_pointer_queue_remove_nulls (SgenPointerQueue *queue);
27 | void sgen_pointer_queue_sort_uniq (SgenPointerQueue *queue);
28 | size_t sgen_pointer_queue_search (SgenPointerQueue *queue, void *addr);
29 | size_t sgen_pointer_queue_find (SgenPointerQueue *queue, void *ptr);
30 | void sgen_pointer_queue_init (SgenPointerQueue *queue, int mem_type);
31 | void* sgen_pointer_queue_pop (SgenPointerQueue *queue);
32 | gboolean sgen_pointer_queue_is_empty (SgenPointerQueue *queue);
33 | void sgen_pointer_queue_free (SgenPointerQueue *queue);
34 | gboolean sgen_pointer_queue_will_grow (SgenPointerQueue *queue);
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/headers/mono/eglib/gmodule.h:
--------------------------------------------------------------------------------
1 | #ifndef __GLIB_GMODULE_H
2 | #define __GLIB_GMODULE_H
3 |
4 | #include
5 |
6 | #define G_MODULE_IMPORT extern
7 | #ifdef G_OS_WIN32
8 | #define G_MODULE_EXPORT __declspec(dllexport)
9 | #else
10 | #define G_MODULE_EXPORT
11 | #endif
12 |
13 | G_BEGIN_DECLS
14 |
15 | /*
16 | * Modules
17 | */
18 | typedef enum {
19 | G_MODULE_BIND_LAZY = 0x01,
20 | G_MODULE_BIND_LOCAL = 0x02,
21 | G_MODULE_BIND_MASK = 0x03
22 | } GModuleFlags;
23 |
24 | G_ENUM_FUNCTIONS (GModuleFlags)
25 |
26 | typedef struct _GModule GModule;
27 |
28 | G_EXTERN_C // Used by libtest, at least.
29 | GModule *g_module_open (const gchar *file, GModuleFlags flags);
30 | G_EXTERN_C // Used by libtest, at least.
31 | gboolean g_module_symbol (GModule *module, const gchar *symbol_name,
32 | gpointer *symbol);
33 | /* Caller must provide a suitable buffer. */
34 | gboolean g_module_address (void *addr, char *file_name, size_t file_name_len,
35 | void **file_base, char *sym_name,
36 | size_t sym_name_len, void **sym_addr);
37 | const gchar *g_module_error (void);
38 | gboolean g_module_close (GModule *module);
39 | gchar * g_module_build_path (const gchar *directory, const gchar *module_name);
40 |
41 | extern char *gmodule_libprefix;
42 | extern char *gmodule_libsuffix;
43 |
44 | G_END_DECLS
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/headers/mono/metadata/wrapper-types.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * NOTE NOTE NOTE
4 | * No additional wrapper types should be added.
5 | * If a new wrapper is asolutely necessary, an existing one needs
6 | * to be removed first (with all the change that implies).
7 | */
8 | WRAPPER(NONE, "none")
9 | WRAPPER(DELEGATE_INVOKE, "delegate-invoke")
10 | WRAPPER(DELEGATE_BEGIN_INVOKE, "delegate-begin-invoke")
11 | WRAPPER(DELEGATE_END_INVOKE, "delegate-end-invoke")
12 | WRAPPER(RUNTIME_INVOKE, "runtime-invoke")
13 | WRAPPER(NATIVE_TO_MANAGED, "native-to-managed")
14 | WRAPPER(MANAGED_TO_NATIVE, "managed-to-native")
15 | WRAPPER(MANAGED_TO_MANAGED, "managed-to-managed")
16 | WRAPPER(REMOTING_INVOKE, "remoting-invoke")
17 | WRAPPER(REMOTING_INVOKE_WITH_CHECK, "remoting-invoke-with-check")
18 | WRAPPER(XDOMAIN_INVOKE, "xdomain-invoke")
19 | WRAPPER(XDOMAIN_DISPATCH, "xdomain-dispatch")
20 | WRAPPER(LDFLD, "ldfld")
21 | WRAPPER(STFLD, "stfld")
22 | WRAPPER(SYNCHRONIZED, "synchronized")
23 | WRAPPER(DYNAMIC_METHOD, "dynamic-method")
24 | WRAPPER(CASTCLASS, "castclass")
25 | WRAPPER(PROXY_ISINST, "proxy_isinst")
26 | WRAPPER(STELEMREF, "stelemref")
27 | WRAPPER(UNBOX, "unbox")
28 | WRAPPER(LDFLDA, "ldflda")
29 | WRAPPER(WRITE_BARRIER, "write-barrier")
30 | WRAPPER(OTHER, "other")
31 | WRAPPER(COMINTEROP_INVOKE, "cominterop-invoke")
32 | WRAPPER(COMINTEROP, "cominterop")
33 | WRAPPER(ALLOC, "alloc")
34 |
35 |
36 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-mlist.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_METADATA_MONO_MLIST_H__
6 | #define __MONO_METADATA_MONO_MLIST_H__
7 |
8 | /*
9 | * mono-mlist.h: Managed object list implementation
10 | */
11 |
12 | #include
13 |
14 | typedef struct _MonoMList MonoMList;
15 | MONO_API MONO_RT_EXTERNAL_ONLY
16 | MonoMList* mono_mlist_alloc (MonoObject *data);
17 | MONO_API MonoObject* mono_mlist_get_data (MonoMList* list);
18 | MONO_API void mono_mlist_set_data (MonoMList* list, MonoObject *data);
19 | MONO_API MonoMList* mono_mlist_set_next (MonoMList* list, MonoMList *next);
20 | MONO_API int mono_mlist_length (MonoMList* list);
21 | MONO_API MonoMList* mono_mlist_next (MonoMList* list);
22 | MONO_API MonoMList* mono_mlist_last (MonoMList* list);
23 | MONO_API MONO_RT_EXTERNAL_ONLY
24 | MonoMList* mono_mlist_prepend (MonoMList* list, MonoObject *data);
25 | MONO_API MONO_RT_EXTERNAL_ONLY
26 | MonoMList* mono_mlist_append (MonoMList* list, MonoObject *data);
27 |
28 | MonoMList* mono_mlist_prepend_checked (MonoMList* list, MonoObject *data, MonoError *error);
29 | MonoMList* mono_mlist_append_checked (MonoMList* list, MonoObject *data, MonoError *error);
30 |
31 | MONO_API MonoMList* mono_mlist_remove_item (MonoMList* list, MonoMList *item);
32 |
33 | #endif /* __MONO_METADATA_MONO_MLIST_H__ */
34 |
35 |
--------------------------------------------------------------------------------
/headers/mono/sgen/sgen-tagged-pointer.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Macros for tagging and untagging pointers.
4 | *
5 | * Copyright (C) 2014 Xamarin Inc
6 | *
7 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 | */
9 |
10 | #ifndef __MONO_SGEN_TAGGED_POINTER_H__
11 | #define __MONO_SGEN_TAGGED_POINTER_H__
12 |
13 | #define SGEN_TAGGED_POINTER_MASK 7
14 |
15 | #define SGEN_POINTER_IS_TAGGED_1(p) ((mword)(p) & 1)
16 | #define SGEN_POINTER_TAG_1(p) ((void*)((mword)(p) | 1))
17 | #define SGEN_POINTER_UNTAG_1(p) ((void*)((mword)(p) & ~1))
18 |
19 | #define SGEN_POINTER_IS_TAGGED_2(p) ((mword)(p) & 2)
20 | #define SGEN_POINTER_TAG_2(p) ((void*)((mword)(p) | 2))
21 | #define SGEN_POINTER_UNTAG_2(p) ((void*)((mword)(p) & ~2))
22 |
23 | #define SGEN_POINTER_TAG_12(p) ((mword)(p) & 3)
24 | #define SGEN_POINTER_SET_TAG_12(p,t) ((void*)(((mword)(p) & ~3) | (t)))
25 |
26 | #define SGEN_POINTER_IS_TAGGED_4(p) ((mword)(p) & 4)
27 | #define SGEN_POINTER_TAG_4(p) ((void*)((mword)(p) | 4))
28 | #define SGEN_POINTER_UNTAG_4(p) ((void*)((mword)(p) & ~4))
29 |
30 | #define SGEN_POINTER_UNTAG_12(p) ((void*)((mword)(p) & ~3))
31 | #define SGEN_POINTER_UNTAG_24(p) ((void*)((mword)(p) & ~6))
32 |
33 | #define SGEN_POINTER_IS_TAGGED_ANY(p) ((mword)(p) & SGEN_TAGGED_POINTER_MASK)
34 | #define SGEN_POINTER_UNTAG_ALL(p) ((void*)((mword)(p) & ~SGEN_TAGGED_POINTER_MASK))
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-io-portability.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_IO_PORTABILITY_H
6 | #define __MONO_IO_PORTABILITY_H
7 |
8 | #include
9 | #include
10 | #include "config.h"
11 |
12 | enum {
13 | PORTABILITY_NONE = 0x00,
14 | PORTABILITY_UNKNOWN = 0x01,
15 | PORTABILITY_DRIVE = 0x02,
16 | PORTABILITY_CASE = 0x04
17 | };
18 |
19 | #ifdef DISABLE_PORTABILITY
20 |
21 | #define mono_portability_helpers_init()
22 | #define mono_portability_find_file(pathname,last_exists) NULL
23 |
24 | #define IS_PORTABILITY_NONE FALSE
25 | #define IS_PORTABILITY_UNKNOWN FALSE
26 | #define IS_PORTABILITY_DRIVE FALSE
27 | #define IS_PORTABILITY_CASE FALSE
28 | #define IS_PORTABILITY_SET FALSE
29 |
30 | #else
31 |
32 | void mono_portability_helpers_init (void);
33 | gchar *mono_portability_find_file (const gchar *pathname, gboolean last_exists);
34 |
35 | extern int mono_io_portability_helpers;
36 |
37 | #define IS_PORTABILITY_NONE (mono_io_portability_helpers & PORTABILITY_NONE)
38 | #define IS_PORTABILITY_UNKNOWN (mono_io_portability_helpers & PORTABILITY_UNKNOWN)
39 | #define IS_PORTABILITY_DRIVE (mono_io_portability_helpers & PORTABILITY_DRIVE)
40 | #define IS_PORTABILITY_CASE (mono_io_portability_helpers & PORTABILITY_CASE)
41 | #define IS_PORTABILITY_SET (mono_io_portability_helpers > 0)
42 |
43 | #endif
44 |
45 | #endif
46 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-x509-store.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-x509-store.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/3/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_x509_store__
10 | #define __btls__btls_x509_store__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 |
15 | MONO_API MonoBtlsX509Store *
16 | mono_btls_x509_store_new (void);
17 |
18 | MONO_API MonoBtlsX509Store *
19 | mono_btls_x509_store_from_store (X509_STORE *ctx);
20 |
21 | MONO_API MonoBtlsX509Store *
22 | mono_btls_x509_store_from_ctx (X509_STORE_CTX *ctx);
23 |
24 | MONO_API MonoBtlsX509Store *
25 | mono_btls_x509_store_from_ssl_ctx (MonoBtlsSslCtx *ctx);
26 |
27 | MONO_API MonoBtlsX509Store *
28 | mono_btls_x509_store_up_ref (MonoBtlsX509Store *store);
29 |
30 | MONO_API int
31 | mono_btls_x509_store_free (MonoBtlsX509Store *store);
32 |
33 | MONO_API X509_STORE *
34 | mono_btls_x509_store_peek_store (MonoBtlsX509Store *store);
35 |
36 | MONO_API int
37 | mono_btls_x509_store_add_cert (MonoBtlsX509Store *store, X509 *cert);
38 |
39 | MONO_API int
40 | mono_btls_x509_store_load_locations (MonoBtlsX509Store *store, const char *file, const char *path);
41 |
42 | MONO_API int
43 | mono_btls_x509_store_set_default_paths (MonoBtlsX509Store *store);
44 |
45 | MONO_API int
46 | mono_btls_x509_store_get_count (MonoBtlsX509Store *store);
47 |
48 | #endif /* defined(__btls__btls_x509_store__) */
49 |
50 |
--------------------------------------------------------------------------------
/headers/mono/utils/os-event.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_UTILS_OS_EVENT_H_
6 | #define _MONO_UTILS_OS_EVENT_H_
7 |
8 | #include
9 | #include
10 |
11 | #include
12 | #include "mono-os-mutex.h"
13 |
14 | #define MONO_INFINITE_WAIT ((guint32) 0xFFFFFFFF)
15 |
16 | #define MONO_OS_EVENT_WAIT_MAXIMUM_OBJECTS 64
17 |
18 | typedef enum {
19 | MONO_OS_EVENT_WAIT_RET_SUCCESS_0 = 0,
20 | MONO_OS_EVENT_WAIT_RET_ALERTED = -1,
21 | MONO_OS_EVENT_WAIT_RET_TIMEOUT = -2,
22 | } MonoOSEventWaitRet;
23 |
24 | typedef struct _MonoOSEvent MonoOSEvent;
25 |
26 | typedef void (*MonoOSEventFreeCb) (MonoOSEvent*);
27 |
28 | struct _MonoOSEvent {
29 | #ifdef HOST_WIN32
30 | gpointer handle;
31 | #else
32 | GPtrArray *conds;
33 | gboolean signalled;
34 | #endif
35 | };
36 |
37 | MONO_API void
38 | mono_os_event_init (MonoOSEvent *event, gboolean initial);
39 |
40 | MONO_API void
41 | mono_os_event_destroy (MonoOSEvent *event);
42 |
43 | MONO_API void
44 | mono_os_event_set (MonoOSEvent *event);
45 |
46 | MONO_API void
47 | mono_os_event_reset (MonoOSEvent *event);
48 |
49 | MONO_API MonoOSEventWaitRet
50 | mono_os_event_wait_one (MonoOSEvent *event, guint32 timeout, gboolean alertable);
51 |
52 | MONO_API MonoOSEventWaitRet
53 | mono_os_event_wait_multiple (MonoOSEvent **events, gsize nevents, gboolean waitall, guint32 timeout, gboolean alertable);
54 |
55 | #endif /* _MONO_UTILS_OS_EVENT_H_ */
56 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-conc-hashtable.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * A mostly concurrent hashtable
4 | *
5 | * Author:
6 | * Rodrigo Kumpera (kumpera@gmail.com)
7 | *
8 | * (C) 2014 Xamarin
9 | */
10 |
11 | #ifndef __MONO_CONCURRENT_HASHTABLE_H__
12 | #define __MONO_CONCURRENT_HASHTABLE_H__
13 |
14 | #include
15 | #include
16 | #include
17 | #include
18 |
19 | typedef struct _MonoConcurrentHashTable MonoConcurrentHashTable;
20 |
21 | MONO_API MonoConcurrentHashTable* mono_conc_hashtable_new (GHashFunc hash_func, GEqualFunc key_equal_func);
22 | MONO_API MonoConcurrentHashTable* mono_conc_hashtable_new_full (GHashFunc hash_func, GEqualFunc key_equal_func, GDestroyNotify key_destroy_func, GDestroyNotify value_destroy_func);
23 | MONO_API void mono_conc_hashtable_destroy (MonoConcurrentHashTable *hash_table);
24 | MONO_API gpointer mono_conc_hashtable_lookup (MonoConcurrentHashTable *hash_table, gpointer key);
25 | MONO_API gpointer mono_conc_hashtable_insert (MonoConcurrentHashTable *hash_table, gpointer key, gpointer value);
26 | MONO_API gpointer mono_conc_hashtable_remove (MonoConcurrentHashTable *hash_table, gpointer key);
27 | MONO_API void mono_conc_hashtable_foreach (MonoConcurrentHashTable *hashtable, GHFunc func, gpointer userdata);
28 | MONO_API void mono_conc_hashtable_foreach_steal (MonoConcurrentHashTable *hashtable, GHRFunc func, gpointer userdata);
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/headers/mono/btls/btls-x509-crl.h:
--------------------------------------------------------------------------------
1 | //
2 | // btls-x509-crl.h
3 | // MonoBtls
4 | //
5 | // Created by Martin Baulig on 3/23/16.
6 | // Copyright © 2016 Xamarin. All rights reserved.
7 | //
8 |
9 | #ifndef __btls__btls_x509_crl__
10 | #define __btls__btls_x509_crl__
11 |
12 | #include
13 | #include "btls-ssl.h"
14 | #include "btls-x509.h"
15 |
16 | MONO_API MonoBtlsX509Crl *
17 | mono_btls_x509_crl_from_data (const void *buf, int len, MonoBtlsX509Format format);
18 |
19 | MONO_API MonoBtlsX509Crl *
20 | mono_btls_x509_crl_ref (MonoBtlsX509Crl *crl);
21 |
22 | MONO_API int
23 | mono_btls_x509_crl_free (MonoBtlsX509Crl *crl);
24 |
25 | MONO_API MonoBtlsX509Revoked *
26 | mono_btls_x509_crl_get_by_cert (MonoBtlsX509Crl *crl, X509 *x509);
27 |
28 | MONO_API MonoBtlsX509Revoked *
29 | mono_btls_x509_crl_get_by_serial (MonoBtlsX509Crl *crl, void *serial, int len);
30 |
31 | MONO_API int
32 | mono_btls_x509_crl_get_revoked_count (MonoBtlsX509Crl *crl);
33 |
34 | MONO_API MonoBtlsX509Revoked *
35 | mono_btls_x509_crl_get_revoked (MonoBtlsX509Crl *crl, int index);
36 |
37 | MONO_API int64_t
38 | mono_btls_x509_crl_get_last_update (MonoBtlsX509Crl *crl);
39 |
40 | MONO_API int64_t
41 | mono_btls_x509_crl_get_next_update (MonoBtlsX509Crl *crl);
42 |
43 | MONO_API int64_t
44 | mono_btls_x509_crl_get_version (MonoBtlsX509Crl *crl);
45 |
46 | MONO_API MonoBtlsX509Name *
47 | mono_btls_x509_crl_get_issuer (MonoBtlsX509Crl *crl);
48 |
49 | #endif /* __btls__btls_x509_crl__ */
50 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-dl-fallback.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_UTILS_DL_FALLBACK_H__
6 | #define __MONO_UTILS_DL_FALLBACK_H__
7 |
8 | #include
9 |
10 | MONO_BEGIN_DECLS
11 |
12 | enum {
13 | MONO_DL_EAGER = 0,
14 | MONO_DL_LAZY = 1,
15 | // If MONO_DL_LOCAL is set, it will trump MONO_DL_GLOBAL.
16 | MONO_DL_LOCAL = 2,
17 | // MONO_DL_MASK is unused internally and no longer a full mask on netcore, given the introduction of MONO_DL_GLOBAL. Avoid.
18 | MONO_DL_MASK = 3,
19 | // Only applicable when building Mono in netcore mode.
20 | MONO_DL_GLOBAL = 4
21 | };
22 |
23 | /*
24 | * This is the dynamic loader fallback API
25 | */
26 | typedef struct MonoDlFallbackHandler MonoDlFallbackHandler;
27 |
28 | /*
29 | * The "err" variable contents must be allocated using g_malloc or g_strdup
30 | */
31 | typedef void* (*MonoDlFallbackLoad) (const char *name, int flags, char **err, void *user_data);
32 | typedef void* (*MonoDlFallbackSymbol) (void *handle, const char *name, char **err, void *user_data);
33 | typedef void* (*MonoDlFallbackClose) (void *handle, void *user_data);
34 |
35 | MONO_API MonoDlFallbackHandler *mono_dl_fallback_register (MonoDlFallbackLoad load_func, MonoDlFallbackSymbol symbol_func,
36 | MonoDlFallbackClose close_func, void *user_data);
37 |
38 | MONO_API void mono_dl_fallback_unregister (MonoDlFallbackHandler *handler);
39 |
40 | MONO_END_DECLS
41 |
42 | #endif /* __MONO_UTILS_DL_FALLBACK_H__ */
43 |
44 |
--------------------------------------------------------------------------------
/headers/mono/metadata/debug-mono-ppdb.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Support for the portable PDB symbol file format
4 | *
5 | *
6 | * Author:
7 | * Mono Project (http://www.mono-project.com)
8 | *
9 | * Copyright 2015 Xamarin Inc (http://www.xamarin.com)
10 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
11 | */
12 |
13 | #ifndef __MONO_METADATA_DEBUG_MONO_PPDB_H__
14 | #define __MONO_METADATA_DEBUG_MONO_PPDB_H__
15 |
16 | #include
17 | #include
18 | #include
19 |
20 | MonoPPDBFile*
21 | mono_ppdb_load_file (MonoImage *image, const guint8 *raw_contents, int size);
22 |
23 | void
24 | mono_ppdb_close (MonoDebugHandle *handle);
25 |
26 | MonoDebugMethodInfo *
27 | mono_ppdb_lookup_method (MonoDebugHandle *handle, MonoMethod *method);
28 |
29 | MonoDebugSourceLocation *
30 | mono_ppdb_lookup_location (MonoDebugMethodInfo *minfo, uint32_t offset);
31 |
32 | void
33 | mono_ppdb_get_seq_points (MonoDebugMethodInfo *minfo, char **source_file, GPtrArray **source_file_list, int **source_files, MonoSymSeqPoint **seq_points, int *n_seq_points);
34 |
35 | MonoDebugLocalsInfo*
36 | mono_ppdb_lookup_locals (MonoDebugMethodInfo *minfo);
37 |
38 | MonoDebugMethodAsyncInfo*
39 | mono_ppdb_lookup_method_async_debug_info (MonoDebugMethodInfo *minfo);
40 |
41 | MonoImage *
42 | mono_ppdb_get_image (MonoPPDBFile *ppdb);
43 |
44 | char *
45 | mono_ppdb_get_sourcelink (MonoDebugHandle *handle);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/headers/mono/mini/dwarfwriter.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Creation of DWARF debug information
4 | *
5 | * Author:
6 | * Zoltan Varga (vargaz@gmail.com)
7 | *
8 | * (C) 2008-2009 Novell, Inc.
9 | */
10 |
11 | #ifndef __MONO_DWARF_WRITER_H__
12 | #define __MONO_DWARF_WRITER_H__
13 |
14 | #include "config.h"
15 | #include "image-writer.h"
16 | #include "mini.h"
17 |
18 | #include
19 |
20 | #include
21 |
22 | typedef struct _MonoDwarfWriter MonoDwarfWriter;
23 |
24 | MonoDwarfWriter* mono_dwarf_writer_create (MonoImageWriter *writer, FILE *il_file, int il_file_start_line, gboolean emit_line_numbers);
25 |
26 | void mono_dwarf_writer_destroy (MonoDwarfWriter *w);
27 |
28 | void mono_dwarf_writer_emit_base_info (MonoDwarfWriter *w, const char *cu_name, GSList *base_unwind_program);
29 |
30 | void mono_dwarf_writer_close (MonoDwarfWriter *w);
31 |
32 | int mono_dwarf_writer_get_il_file_line_index (MonoDwarfWriter *w);
33 |
34 | void mono_dwarf_writer_emit_trampoline (MonoDwarfWriter *w, const char *tramp_name, char *start_symbol, char *end_symbol, guint8 *code, guint32 code_size, GSList *unwind_info);
35 |
36 | void
37 | mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod *method, char *start_symbol, char *end_symbol, char *linkage_name,
38 | guint8 *code, guint32 code_size, MonoInst **args, MonoInst **locals, GSList *unwind_info, MonoDebugMethodJitInfo *debug_info);
39 |
40 | char *
41 | mono_dwarf_escape_path (const char *name);
42 |
43 | #endif
44 |
--------------------------------------------------------------------------------
/headers/mono/mini/llvm-jit.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * LLVM backend
4 | *
5 | * Authors:
6 | * Zoltan Varga (vargaz@gmail.com)
7 | *
8 | * (C) 2009 Novell, Inc.
9 | */
10 |
11 | #ifndef __MONO_LLVM_JIT_H__
12 | #define __MONO_LLVM_JIT_H__
13 |
14 | #include
15 |
16 | #include "llvm-c/Core.h"
17 | #include "llvm-c/ExecutionEngine.h"
18 |
19 | #include "mini.h"
20 |
21 | #ifdef HAVE_UNWIND_H
22 | #include
23 | #endif
24 |
25 | /* These can't go into mini-.h since thats not included into llvm-jit.cpp */
26 | #if defined(TARGET_OSX) || defined(__linux__)
27 | #if defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_X86)
28 | #define MONO_ARCH_LLVM_JIT_SUPPORTED 1
29 | #endif
30 | #endif
31 |
32 | G_BEGIN_DECLS
33 |
34 | typedef unsigned char * (AllocCodeMemoryCb) (LLVMValueRef function, int size);
35 | typedef void (FunctionEmittedCb) (LLVMValueRef function, void *start, void *end);
36 | typedef void (ExceptionTableCb) (void *data);
37 |
38 | typedef void* MonoEERef;
39 |
40 | MonoEERef
41 | mono_llvm_create_ee (AllocCodeMemoryCb *alloc_cb, FunctionEmittedCb *emitted_cb, ExceptionTableCb *exception_cb, LLVMExecutionEngineRef *ee);
42 |
43 | void
44 | mono_llvm_dispose_ee (MonoEERef *mono_ee);
45 |
46 | gpointer
47 | mono_llvm_compile_method (MonoEERef mono_ee, LLVMValueRef method, int nvars, LLVMValueRef *callee_vars, gpointer *callee_addrs, gpointer *eh_frame);
48 |
49 | void
50 | mono_llvm_set_unhandled_exception_handler (void);
51 |
52 | G_END_DECLS
53 |
54 | #endif /* __MONO_LLVM_JIT_H__ */
55 |
--------------------------------------------------------------------------------
/headers/mono/utils/mono-coop-semaphore.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_COOP_SEMAPHORE_H__
6 | #define __MONO_COOP_SEMAPHORE_H__
7 |
8 | #include
9 | #include
10 |
11 | #include "mono-os-semaphore.h"
12 | #include "mono-threads-api.h"
13 |
14 | /* We put the OS sync primitives in struct, so the compiler will warn us if
15 | * we use mono_os_(mutex|cond|sem)_... on MonoCoop(Mutex|Cond|Sem) structures */
16 |
17 | typedef struct _MonoCoopSem MonoCoopSem;
18 | struct _MonoCoopSem {
19 | MonoSemType s;
20 | };
21 |
22 | static inline void
23 | mono_coop_sem_init (MonoCoopSem *sem, int value)
24 | {
25 | mono_os_sem_init (&sem->s, value);
26 | }
27 |
28 | static inline void
29 | mono_coop_sem_destroy (MonoCoopSem *sem)
30 | {
31 | mono_os_sem_destroy (&sem->s);
32 | }
33 |
34 | static inline gint
35 | mono_coop_sem_wait (MonoCoopSem *sem, MonoSemFlags flags)
36 | {
37 | gint res;
38 |
39 | MONO_ENTER_GC_SAFE;
40 |
41 | res = mono_os_sem_wait (&sem->s, flags);
42 |
43 | MONO_EXIT_GC_SAFE;
44 |
45 | return res;
46 | }
47 |
48 | static inline MonoSemTimedwaitRet
49 | mono_coop_sem_timedwait (MonoCoopSem *sem, guint timeout_ms, MonoSemFlags flags)
50 | {
51 | MonoSemTimedwaitRet res;
52 |
53 | MONO_ENTER_GC_SAFE;
54 |
55 | res = mono_os_sem_timedwait (&sem->s, timeout_ms, flags);
56 |
57 | MONO_EXIT_GC_SAFE;
58 |
59 | return res;
60 | }
61 |
62 | static inline void
63 | mono_coop_sem_post (MonoCoopSem *sem)
64 | {
65 | mono_os_sem_post (&sem->s);
66 | }
67 |
68 | #endif /* __MONO_COOP_SEMAPHORE_H__ */
69 |
--------------------------------------------------------------------------------
/VMLVita2D/main.c:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include
6 | #include
7 |
8 | extern void** mono_aot_module_Vita2D_info;
9 |
10 | int _vita2d_init()
11 | {
12 | vita2d_init_param iparam;
13 |
14 | memset(&iparam, 0, sizeof(vita2d_init_param));
15 |
16 | return vita2d_init(&iparam);
17 | }
18 |
19 | int _vita2d_pgf_draw_text(vita2d_pgf *font, int x, int y, unsigned int color, float scale, MonoString *text)
20 | {
21 | return vita2d_pgf_draw_text(font, x, y, color, scale, mono_string_to_utf8(text));
22 | }
23 |
24 | __declspec (dllexport) void VMLVita2DRegister()
25 | {
26 | mono_aot_register_module(mono_aot_module_Vita2D_info);
27 |
28 | //General
29 | mono_add_internal_call("Vita2D::Init", _vita2d_init);
30 | mono_add_internal_call("Vita2D::SetClearColor", vita2d_set_clear_color);
31 |
32 | //PGF
33 | mono_add_internal_call("Vita2D::LoadDefaultPGF", vita2d_load_default_pgf);
34 |
35 | //Draw
36 | mono_add_internal_call("Vita2D::StartDrawing", vita2d_start_drawing);
37 | mono_add_internal_call("Vita2D::EndDrawing", vita2d_end_drawing);
38 | mono_add_internal_call("Vita2D::SwapBuffers", vita2d_end_shfb);
39 | mono_add_internal_call("Vita2D::ClearScreen", vita2d_clear_screen);
40 | mono_add_internal_call("Vita2D::DrawRectangle", vita2d_draw_rectangle);
41 | mono_add_internal_call("Vita2D::DrawLine", vita2d_draw_line);
42 | mono_add_internal_call("Vita2D::FillCircle", vita2d_draw_fill_circle);
43 | mono_add_internal_call("Vita2D::PGFDrawText", _vita2d_pgf_draw_text);
44 | }
45 |
--------------------------------------------------------------------------------
/headers/mono/metadata/mono-endian.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_ENDIAN_H_
6 | #define _MONO_METADATA_ENDIAN_H_ 1
7 |
8 | #include
9 |
10 | typedef union {
11 | guint32 ival;
12 | float fval;
13 | } mono_rfloat;
14 |
15 | typedef union {
16 | guint64 ival;
17 | double fval;
18 | unsigned char cval [8];
19 | } mono_rdouble;
20 |
21 | #if defined(__s390x__)
22 |
23 | #define read16(x) __builtin_bswap16(*((guint16 *)(x)))
24 | #define read32(x) __builtin_bswap32(*((guint32 *)(x)))
25 | #define read64(x) __builtin_bswap64(*((guint64 *)(x)))
26 |
27 | #else
28 |
29 | # if NO_UNALIGNED_ACCESS
30 |
31 | guint16 mono_read16 (const unsigned char *x);
32 | guint32 mono_read32 (const unsigned char *x);
33 | guint64 mono_read64 (const unsigned char *x);
34 |
35 | #define read16(x) (mono_read16 ((const unsigned char *)(x)))
36 | #define read32(x) (mono_read32 ((const unsigned char *)(x)))
37 | #define read64(x) (mono_read64 ((const unsigned char *)(x)))
38 |
39 | # else
40 |
41 | #define read16(x) GUINT16_FROM_LE (*((const guint16 *) (x)))
42 | #define read32(x) GUINT32_FROM_LE (*((const guint32 *) (x)))
43 | #define read64(x) GUINT64_FROM_LE (*((const guint64 *) (x)))
44 |
45 | # endif
46 |
47 | #endif
48 |
49 | #define readr4(x,dest) \
50 | do { \
51 | mono_rfloat mf; \
52 | mf.ival = read32 ((x)); \
53 | *(dest) = mf.fval; \
54 | } while (0)
55 |
56 | #define readr8(x,dest) \
57 | do { \
58 | mono_rdouble mf; \
59 | mf.ival = read64 ((x)); \
60 | *(dest) = mf.fval; \
61 | } while (0)
62 |
63 | #endif /* _MONO_METADATA_ENDIAN_H_ */
64 |
--------------------------------------------------------------------------------
/headers/mono/metadata/coree.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * mscoree.dll functions
4 | *
5 | * Author:
6 | * Kornel Pal
7 | *
8 | * Copyright (C) 2008 Kornel Pal
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #ifndef __MONO_COREE_H__
13 | #define __MONO_COREE_H__
14 |
15 | #include
16 | #include
17 |
18 | #ifdef HOST_WIN32
19 |
20 | #include
21 | #include
22 | #include "image.h"
23 | #include "image-internals.h"
24 |
25 | #define STATUS_SUCCESS 0x00000000L
26 | #define STATUS_INVALID_IMAGE_FORMAT 0xC000007BL
27 |
28 | MONO_API HRESULT STDAPICALLTYPE MonoFixupCorEE(HMODULE ModuleHandle);
29 |
30 | /* Defined by the linker. */
31 | #ifndef _MSC_VER
32 | #ifdef __MINGW64_VERSION_MAJOR
33 | #define __ImageBase __MINGW_LSYMBOL(_image_base__)
34 | #else
35 | #define __ImageBase _image_base__
36 | #endif
37 | #endif
38 | G_BEGIN_DECLS extern IMAGE_DOS_HEADER __ImageBase; G_END_DECLS
39 | extern HMODULE coree_module_handle;
40 |
41 | HMODULE WINAPI MonoLoadImage(LPCWSTR FileName);
42 | STDAPI MonoFixupExe(HMODULE ModuleHandle);
43 |
44 | gchar* mono_get_module_file_name (HMODULE module_handle);
45 | void mono_load_coree (const char* file_name);
46 | void mono_fixup_exe_image (MonoImage* image);
47 |
48 | /* Declared in image.c. */
49 | MonoImage* mono_image_open_from_module_handle (MonoAssemblyLoadContext *alc, HMODULE module_handle, char* fname, gboolean has_entry_point, MonoImageOpenStatus* status);
50 |
51 | #endif /* HOST_WIN32 */
52 |
53 | #endif /* __MONO_COREE_H__ */
54 |
--------------------------------------------------------------------------------
/headers/mono/metadata/tokentype.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef _MONO_METADATA_TOKENTYPE_H_
6 | #define _MONO_METADATA_TOKENTYPE_H_
7 |
8 | /*
9 | * These tokens match the table ID except for the last
10 | * three (string, name and base type which are special)
11 | */
12 |
13 | typedef enum {
14 | MONO_TOKEN_MODULE = 0x00000000,
15 | MONO_TOKEN_TYPE_REF = 0x01000000,
16 | MONO_TOKEN_TYPE_DEF = 0x02000000,
17 | MONO_TOKEN_FIELD_DEF = 0x04000000,
18 | MONO_TOKEN_METHOD_DEF = 0x06000000,
19 | MONO_TOKEN_PARAM_DEF = 0x08000000,
20 | MONO_TOKEN_INTERFACE_IMPL = 0x09000000,
21 | MONO_TOKEN_MEMBER_REF = 0x0a000000,
22 | MONO_TOKEN_CUSTOM_ATTRIBUTE = 0x0c000000,
23 | MONO_TOKEN_PERMISSION = 0x0e000000,
24 | MONO_TOKEN_SIGNATURE = 0x11000000,
25 | MONO_TOKEN_EVENT = 0x14000000,
26 | MONO_TOKEN_PROPERTY = 0x17000000,
27 | MONO_TOKEN_MODULE_REF = 0x1a000000,
28 | MONO_TOKEN_TYPE_SPEC = 0x1b000000,
29 | MONO_TOKEN_ASSEMBLY = 0x20000000,
30 | MONO_TOKEN_ASSEMBLY_REF = 0x23000000,
31 | MONO_TOKEN_FILE = 0x26000000,
32 | MONO_TOKEN_EXPORTED_TYPE = 0x27000000,
33 | MONO_TOKEN_MANIFEST_RESOURCE = 0x28000000,
34 | MONO_TOKEN_GENERIC_PARAM = 0x2a000000,
35 | MONO_TOKEN_METHOD_SPEC = 0x2b000000,
36 |
37 | /*
38 | * These do not match metadata tables directly
39 | */
40 | MONO_TOKEN_STRING = 0x70000000,
41 | MONO_TOKEN_NAME = 0x71000000,
42 | MONO_TOKEN_BASE_TYPE = 0x72000000
43 | } MonoTokenType;
44 |
45 | #endif /* _MONO_METADATA_TOKENTYPE_H_ */
46 |
--------------------------------------------------------------------------------
/headers/mono/metadata/cominterop-win32-internals.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright 2016 Microsoft
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 | #ifndef __MONO_METADATA_COMINTEROP_WIN32_INTERNALS_H__
7 | #define __MONO_METADATA_COMINTEROP_WIN32_INTERNALS_H__
8 |
9 | #include
10 | #include
11 |
12 | // On some Windows platforms the implementation of below methods are hosted
13 | // in separate source files like cominterop-win32-*.c. On other platforms,
14 | // the implementation is kept in cominterop.c and declared as static and in some
15 | // cases even inline.
16 | #if defined(HOST_WIN32) && !G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT)
17 |
18 | guint32
19 | mono_marshal_win_safearray_get_dim (gpointer safearray);
20 |
21 | int
22 | mono_marshal_win_safe_array_get_lbound (gpointer psa, guint nDim, glong* plLbound);
23 |
24 | int
25 | mono_marshal_win_safe_array_get_ubound (gpointer psa, guint nDim, glong* plUbound);
26 |
27 | int
28 | mono_marshal_win_safearray_get_value (gpointer safearray, gpointer indices, gpointer *result);
29 |
30 | void
31 | mono_marshal_win_safearray_end (gpointer safearray, gpointer indices);
32 |
33 | gboolean
34 | mono_marshal_win_safearray_create_internal (UINT cDims, SAFEARRAYBOUND *rgsabound, gpointer *newsafearray);
35 |
36 | int
37 | mono_marshal_win_safearray_set_value (gpointer safearray, gpointer indices, gpointer value);
38 |
39 | #endif /* HOST_WIN32 && !G_HAVE_API_SUPPORT(HAVE_CLASSIC_WINAPI_SUPPORT | HAVE_UWP_WINAPI_SUPPORT) */
40 |
41 | #endif /* __MONO_METADATA_COMINTEROP_WIN32_INTERNALS_H__ */
42 |
--------------------------------------------------------------------------------
/headers/mono/utils/mach-support.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | */
4 |
5 | #ifndef __MONO_MACH_SUPPORT_H__
6 | #define __MONO_MACH_SUPPORT_H__
7 |
8 | #include "config.h"
9 | #if defined(__MACH__)
10 | #include
11 | #include
12 | #include "mono/utils/mono-compiler.h"
13 | #include "mono/utils/mono-context.h"
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 |
20 | #define MONO_MACH_ARCH_SUPPORTED 1
21 | #if defined(__arm__)
22 | typedef _STRUCT_MCONTEXT *mcontext_t;
23 | #elif defined(__aarch64__)
24 | typedef _STRUCT_MCONTEXT64 *mcontext_t;
25 | #endif
26 |
27 | int mono_mach_arch_get_mcontext_size (void);
28 | void mono_mach_arch_thread_states_to_mcontext (thread_state_t state, thread_state_t fpstate, void *context);
29 | void mono_mach_arch_mcontext_to_thread_states (void *context, thread_state_t state, thread_state_t fpstate);
30 | void mono_mach_arch_thread_states_to_mono_context (thread_state_t state, thread_state_t fpstate, MonoContext *context);
31 |
32 | /* FIXME: Should return size_t, not int. */
33 | int mono_mach_arch_get_thread_state_size (void);
34 | int mono_mach_arch_get_thread_fpstate_size (void);
35 | kern_return_t mono_mach_arch_get_thread_states (thread_port_t thread, thread_state_t state, mach_msg_type_number_t *count, thread_state_t fpstate, mach_msg_type_number_t *fpcount);
36 | kern_return_t mono_mach_arch_set_thread_states (thread_port_t thread, thread_state_t state, mach_msg_type_number_t count, thread_state_t fpstate, mach_msg_type_number_t fpcount);
37 |
38 | #endif
39 | #endif /* __MONO_MACH_SUPPORT_H__ */
40 |
--------------------------------------------------------------------------------
/headers/mono/mini/mini-amd64-gsharedvt.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * libcorkscrew-based native unwinder
4 | *
5 | * Authors:
6 | * Zoltan Varga
7 | * Rodrigo Kumpera
8 | * Andi McClure
9 | * Johan Lorensson
10 | *
11 | * Copyright 2015 Xamarin, Inc (http://www.xamarin.com)
12 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
13 | */
14 | #ifndef MINI_AMD64_GSHAREDVT_H
15 | #define MINI_AMD64_GSHAREDVT_H
16 |
17 | typedef enum {
18 | GSHAREDVT_ARG_NONE = 0,
19 | GSHAREDVT_ARG_BYVAL_TO_BYREF,
20 | GSHAREDVT_ARG_BYREF_TO_BYVAL,
21 | GSHAREDVT_ARG_BYREF_TO_BYVAL_I1,
22 | GSHAREDVT_ARG_BYREF_TO_BYVAL_U1,
23 | GSHAREDVT_ARG_BYREF_TO_BYVAL_I2,
24 | GSHAREDVT_ARG_BYREF_TO_BYVAL_U2,
25 | GSHAREDVT_ARG_BYREF_TO_BYVAL_I4,
26 | GSHAREDVT_ARG_BYREF_TO_BYVAL_U4
27 | } GSharedVtArgMarshal;
28 |
29 | typedef enum {
30 | GSHAREDVT_RET_NONE = 0,
31 | GSHAREDVT_RET_I1, // 1 byte integer
32 | GSHAREDVT_RET_U1, // 1 byte unsigned
33 | GSHAREDVT_RET_I2, // 2 byte integer
34 | GSHAREDVT_RET_U2, // 2 byte unsigned
35 | GSHAREDVT_RET_I4, // 4 byte integer
36 | GSHAREDVT_RET_U4, // 4 byte unsigned
37 | GSHAREDVT_RET_I8, // 8 byte integer
38 | GSHAREDVT_RET_IREGS_1, // Load in first return register
39 | GSHAREDVT_RET_R8, // Double
40 | GSHAREDVT_RET_NUM,
41 | } GSharedVtRetMarshal;
42 |
43 | #ifdef DEBUG_AMD64_GSHAREDVT
44 | #define DEBUG_AMD64_GSHAREDVT_PRINT printf
45 | #else
46 | #define DEBUG_AMD64_GSHAREDVT_PRINT(...)
47 | #endif
48 |
49 | #endif /* MINI_AMD64_GSHAREDVT_H */
50 |
--------------------------------------------------------------------------------
/headers/mono/sgen/sgen-archdep.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Architecture dependent parts of SGen.
4 | *
5 | * Copyright 2001-2003 Ximian, Inc
6 | * Copyright 2003-2010 Novell, Inc.
7 | * Copyright (C) 2012 Xamarin Inc
8 | *
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 | #ifndef __MONO_SGENARCHDEP_H__
12 | #define __MONO_SGENARCHDEP_H__
13 |
14 | #include
15 |
16 | #if defined(MONO_CROSS_COMPILE)
17 |
18 | #define REDZONE_SIZE 0
19 |
20 | #elif defined(TARGET_X86)
21 |
22 | #define REDZONE_SIZE 0
23 |
24 | #ifndef MONO_ARCH_HAS_MONO_CONTEXT
25 | #error 0
26 | #endif
27 |
28 | #elif defined(TARGET_AMD64)
29 |
30 | #ifdef HOST_WIN32
31 | /* The Windows x64 ABI defines no "red zone". The ABI states:
32 | "All memory beyond the current address of RSP is considered volatile" */
33 | #define REDZONE_SIZE 0
34 | #else
35 | #define REDZONE_SIZE 128
36 | #endif
37 |
38 | #elif defined(TARGET_POWERPC)
39 |
40 | #define REDZONE_SIZE 224
41 |
42 | #elif defined(TARGET_ARM)
43 |
44 | #define REDZONE_SIZE 0
45 |
46 | #elif defined(TARGET_ARM64)
47 |
48 | #if defined(__APPLE__)
49 | #define REDZONE_SIZE 128
50 | #else
51 | #define REDZONE_SIZE 0
52 | #endif
53 |
54 | #elif defined(__mips__)
55 |
56 | #define REDZONE_SIZE 0
57 |
58 | #elif defined(__s390x__)
59 |
60 | #define REDZONE_SIZE 0
61 |
62 | #elif defined(__sparc__)
63 |
64 | #define REDZONE_SIZE 0
65 |
66 | #elif defined (TARGET_RISCV)
67 |
68 | #define REDZONE_SIZE (0)
69 |
70 | #elif defined (TARGET_WASM)
71 |
72 | #define REDZONE_SIZE 0
73 |
74 | #endif
75 |
76 | #endif /* __MONO_SGENARCHDEP_H__ */
77 |
--------------------------------------------------------------------------------
/headers/mono/metadata/method-builder.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Functions for creating IL methods at runtime.
4 | *
5 | * Author:
6 | * Paolo Molaro (lupus@ximian.com)
7 | *
8 | * (C) 2002 Ximian, Inc. http://www.ximian.com
9 | *
10 | */
11 |
12 | #ifndef __MONO_METHOD_BUILDER_H__
13 | #define __MONO_METHOD_BUILDER_H__
14 |
15 | #include "config.h"
16 | #include
17 | #include
18 | #include
19 | #include
20 | #include
21 |
22 | typedef struct _MonoMethodBuilder MonoMethodBuilder;
23 |
24 | #define MONO_METHOD_BUILDER_CALLBACKS_VERSION 1
25 |
26 | typedef struct {
27 | int version;
28 | MonoMethodBuilder* (*new_base) (MonoClass *klass, MonoWrapperType type);
29 | void (*free) (MonoMethodBuilder *mb);
30 | MonoMethod* (*create_method) (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack);
31 | } MonoMethodBuilderCallbacks;
32 |
33 | MonoMethodBuilder *
34 | mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type);
35 |
36 | MonoMethodBuilder *
37 | mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType type);
38 |
39 | void
40 | mono_mb_free (MonoMethodBuilder *mb);
41 |
42 | MonoMethod *
43 | mono_mb_create_method (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack);
44 |
45 | guint32
46 | mono_mb_add_data (MonoMethodBuilder *mb, gpointer data);
47 |
48 | char*
49 | mono_mb_strdup (MonoMethodBuilder *mb, const char *s);
50 |
51 | void
52 | mono_install_method_builder_callbacks (MonoMethodBuilderCallbacks *cb);
53 |
54 | #endif /* __MONO_METHOD_BUILDER_H__ */
55 |
--------------------------------------------------------------------------------
/headers/mono/mini/cfgdump.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Copyright (C) 2016 Xamarin Inc
4 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
5 | */
6 |
7 | #ifndef __MINI_CFGDUMP_H__
8 | #define __MINI_CFGDUMP_H__
9 | #include
10 |
11 | #define CONSTANT_POOL_MAX_SIZE 8000
12 |
13 | #define BEGIN_GROUP 0x00
14 | #define BEGIN_GRAPH 0x01
15 | #define CLOSE_GROUP 0x02
16 |
17 | #define POOL_NEW 0x00
18 | #define POOL_STRING 0x01
19 | #define POOL_ENUM 0x02
20 | #define POOL_KLASS 0x03
21 | #define POOL_METHOD 0x04
22 | #define POOL_NULL 0x05
23 | #define POOL_NODE_CLASS 0x06
24 | #define POOL_FIELD 0x07
25 | #define POOL_SIGNATURE 0x08
26 |
27 | #define PROPERTY_POOL 0x00
28 | #define PROPERTY_INT 0x01
29 | #define PROPERTY_LONG 0x02
30 | #define PROPERTY_DOUBLE 0x03
31 | #define PROPERTY_FLOAT 0x04
32 | #define PROPERTY_TRUE 0x05
33 | #define PROPERTY_FALSE 0x06
34 | #define PROPERTY_ARRAY 0x07
35 | #define PROPERTY_SUBGRAPH 0x08
36 |
37 | #define KLASS 0x00
38 | #define ENUM_KLASS 0x01
39 |
40 |
41 | #define DEFAULT_PORT 4445
42 | #define DEFAULT_HOST "127.0.0.1"
43 |
44 | typedef enum {
45 | PT_STRING,
46 | PT_METHOD,
47 | PT_KLASS,
48 | PT_OPTYPE,
49 | PT_INPUTTYPE,
50 | PT_ENUMKLASS,
51 | PT_SIGNATURE
52 | } pool_type;
53 |
54 | struct _MonoGraphDumper {
55 | int fd;
56 | GHashTable *constant_pool;
57 | short next_cp_id;
58 | GHashTable *insn2id;
59 | int next_insn_id;
60 | };
61 |
62 | typedef struct _MonoGraphDumper MonoGraphDumper;
63 |
64 | struct _ConstantPoolEntry {
65 | pool_type pt;
66 | void *data;
67 | };
68 |
69 | typedef struct _ConstantPoolEntry ConstantPoolEntry;
70 | #endif /* __MINI_CFGDUMP_H__ */
71 |
--------------------------------------------------------------------------------
/headers/mono/metadata/file-mmap.h:
--------------------------------------------------------------------------------
1 | /**
2 | * \file
3 | * Managed mmap wrappers.
4 | *
5 | * Authors:
6 | * Rodrigo Kumpera
7 | *
8 | * Copyright 2014 Xamarin Inc (http://www.xamarin.com)
9 | * Licensed under the MIT license. See LICENSE file in the project root for full license information.
10 | */
11 |
12 | #ifndef _MONO_METADATA_FILE_MMAP_H_
13 | #define _MONO_METADATA_FILE_MMAP_H_
14 |
15 | #include
16 | #include
17 |
18 | #include
19 | #include
20 | #include