[netcore] Implement Thread.GetCurrentProcessorId (#18450)
[mono-project.git] / mono / metadata / loaded-images-internals.h
blob7eb2b2833ddd7fdce220158fc6ced51e30ad5049
1 /**
2 * \file
3 */
5 #ifndef _MONO_METADATA_IMAGE_HASHES_H_
6 #define _MONO_METADATA_IMAGE_HASHES_H_
8 #include <glib.h>
9 #include <mono/metadata/object-forward.h>
10 #include <mono/metadata/loader-internals.h>
11 #include <mono/utils/mono-forward.h>
12 #include <mono/utils/mono-error.h>
15 * The "loaded images" hashes keep track of the various assemblies and netmodules loaded
16 * There are four, for all combinations of [look up by path or assembly name?]
17 * and [normal or reflection-only load?, as in Assembly.ReflectionOnlyLoad]
19 enum {
20 MONO_LOADED_IMAGES_HASH_PATH = 0,
21 MONO_LOADED_IMAGES_HASH_PATH_REFONLY = 1,
22 MONO_LOADED_IMAGES_HASH_NAME = 2,
23 MONO_LOADED_IMAGES_HASH_NAME_REFONLY = 3,
24 MONO_LOADED_IMAGES_HASH_COUNT = 4
27 struct _MonoLoadedImages {
28 MonoAssemblyLoadContext *owner; /* NULL if global */
29 GHashTable *loaded_images_hashes [MONO_LOADED_IMAGES_HASH_COUNT];
32 void
33 mono_loaded_images_init (MonoLoadedImages *li, MonoAssemblyLoadContext *owner);
35 void
36 mono_loaded_images_cleanup (MonoLoadedImages *li, gboolean shutdown);
38 void
39 mono_loaded_images_free (MonoLoadedImages *li);
41 GHashTable *
42 mono_loaded_images_get_hash (MonoLoadedImages *li, gboolean refonly);
44 GHashTable *
45 mono_loaded_images_get_by_name_hash (MonoLoadedImages *li, gboolean refonly);
47 gboolean
48 mono_loaded_images_remove_image (MonoImage *image);
50 MonoLoadedImages*
51 mono_image_get_loaded_images_for_modules (MonoImage *image);
53 #ifndef ENABLE_NETCORE
54 MonoLoadedImages*
55 mono_get_global_loaded_images (void);
56 #endif
58 MonoImage *
59 mono_find_image_owner (void *ptr);
61 void
62 mono_images_lock (void);
64 void
65 mono_images_unlock (void);
67 #endif