Pass the --clr-memory-model flag on the command line instead of MONO_DEBUG so its...
[mono-project.git] / mono / metadata / sgen-bridge-internals.h
blobe66455b16f079b2dcf2e9d766aec9787c848432c
1 /**
2 * \file
3 * The cross-GC bridge.
5 * Copyright (C) 2015 Xamarin Inc
7 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
8 */
10 #ifndef __MONO_SGENBRIDGEINTERNAL_H__
11 #define __MONO_SGENBRIDGEINTERNAL_H__
13 #include "config.h"
15 #ifdef HAVE_SGEN_GC
17 #include "mono/utils/mono-compiler.h"
19 #include "mono/sgen/sgen-gc.h"
20 #include "mono/metadata/sgen-bridge.h"
22 extern volatile gboolean mono_bridge_processing_in_progress;
23 extern MonoGCBridgeCallbacks mono_bridge_callbacks;
25 gboolean sgen_need_bridge_processing (void);
26 void sgen_bridge_reset_data (void);
27 void sgen_bridge_processing_stw_step (void);
28 void sgen_bridge_processing_finish (int generation);
29 gboolean sgen_is_bridge_object (GCObject *obj);
30 MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass);
31 void sgen_bridge_register_finalized_object (GCObject *object);
32 void sgen_bridge_describe_pointer (GCObject *object);
34 gboolean sgen_is_bridge_object (GCObject *obj);
35 void sgen_mark_bridge_object (GCObject *obj);
37 gboolean sgen_bridge_handle_gc_param (const char *opt);
38 gboolean sgen_bridge_handle_gc_debug (const char *opt);
39 void sgen_bridge_print_gc_debug_usage (void);
41 typedef struct {
42 char *dump_prefix;
43 gboolean accounting;
44 gboolean scc_precise_merge; // Used by Tarjan
45 } SgenBridgeProcessorConfig;
47 typedef struct {
48 void (*reset_data) (void);
49 void (*processing_stw_step) (void);
50 void (*processing_build_callback_data) (int generation);
51 void (*processing_after_callback) (int generation);
52 MonoGCBridgeObjectKind (*class_kind) (MonoClass *klass);
53 void (*register_finalized_object) (GCObject *object);
54 void (*describe_pointer) (GCObject *object);
56 /* Should be called once, immediately after init */
57 void (*set_config) (const SgenBridgeProcessorConfig *);
60 * These are set by processing_build_callback_data().
62 int num_sccs;
63 MonoGCBridgeSCC **api_sccs;
65 int num_xrefs;
66 MonoGCBridgeXRef *api_xrefs;
67 } SgenBridgeProcessor;
69 void sgen_old_bridge_init (SgenBridgeProcessor *collector);
70 void sgen_new_bridge_init (SgenBridgeProcessor *collector);
71 void sgen_tarjan_bridge_init (SgenBridgeProcessor *collector);
72 void sgen_set_bridge_implementation (const char *name);
73 void sgen_bridge_set_dump_prefix (const char *prefix);
74 void sgen_init_bridge (void);
76 #endif
78 #endif