2 * sgen-bridge-internals.h: The cross-GC bridge.
4 * Copyright (C) 2015 Xamarin Inc
6 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
9 #ifndef __MONO_SGENBRIDGEINTERNAL_H__
10 #define __MONO_SGENBRIDGEINTERNAL_H__
16 #include "mono/utils/mono-compiler.h"
18 #include "mono/sgen/sgen-gc.h"
19 #include "mono/metadata/sgen-bridge.h"
21 extern volatile gboolean bridge_processing_in_progress;
22 extern MonoGCBridgeCallbacks bridge_callbacks;
24 gboolean sgen_need_bridge_processing (void);
25 void sgen_bridge_reset_data (void);
26 void sgen_bridge_processing_stw_step (void);
27 void sgen_bridge_processing_finish (int generation);
28 gboolean sgen_is_bridge_object (GCObject *obj);
29 MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass);
30 void sgen_bridge_register_finalized_object (GCObject *object);
31 void sgen_bridge_describe_pointer (GCObject *object);
33 gboolean sgen_is_bridge_object (GCObject *obj);
34 void sgen_mark_bridge_object (GCObject *obj);
36 gboolean sgen_bridge_handle_gc_debug (const char *opt);
37 void sgen_bridge_print_gc_debug_usage (void);
40 void (*reset_data) (void);
41 void (*processing_stw_step) (void);
42 void (*processing_build_callback_data) (int generation);
43 void (*processing_after_callback) (int generation);
44 MonoGCBridgeObjectKind (*class_kind) (MonoClass *klass);
45 void (*register_finalized_object) (GCObject *object);
46 void (*describe_pointer) (GCObject *object);
47 void (*enable_accounting) (void);
49 // Optional-- used for debugging
50 void (*set_dump_prefix) (const char *prefix);
53 * These are set by processing_build_callback_data().
56 MonoGCBridgeSCC **api_sccs;
59 MonoGCBridgeXRef *api_xrefs;
60 } SgenBridgeProcessor;
62 void sgen_old_bridge_init (SgenBridgeProcessor *collector);
63 void sgen_new_bridge_init (SgenBridgeProcessor *collector);
64 void sgen_tarjan_bridge_init (SgenBridgeProcessor *collector);
65 void sgen_set_bridge_implementation (const char *name);
66 void sgen_bridge_set_dump_prefix (const char *prefix);
67 void sgen_init_bridge (void);