Merge pull request #2202 from mono/revert-2090-mono-4.2.0-branch-bug25480
[mono-project.git] / mono / metadata / sgen-bridge-internal.h
blob824e5d461a289b75056d4182773bd29ae34d822c
1 /*
2 * sgen-bridge-internal.h: The cross-GC bridge.
4 * Copyright (C) 2015 Xamarin Inc
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License 2.0 as published by the Free Software Foundation;
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License 2.0 along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #ifndef __MONO_SGENBRIDGEINTERNAL_H__
21 #define __MONO_SGENBRIDGEINTERNAL_H__
23 #include "config.h"
25 #ifdef HAVE_SGEN_GC
27 #include "mono/utils/mono-compiler.h"
29 #include "mono/sgen/sgen-gc.h"
30 #include "mono/metadata/sgen-bridge.h"
32 extern gboolean bridge_processing_in_progress;
33 extern MonoGCBridgeCallbacks bridge_callbacks;
35 gboolean sgen_need_bridge_processing (void);
36 void sgen_bridge_reset_data (void);
37 void sgen_bridge_processing_stw_step (void);
38 void sgen_bridge_processing_finish (int generation);
39 gboolean sgen_is_bridge_object (GCObject *obj);
40 MonoGCBridgeObjectKind sgen_bridge_class_kind (MonoClass *klass);
41 void sgen_bridge_register_finalized_object (GCObject *object);
42 void sgen_bridge_describe_pointer (GCObject *object);
44 gboolean sgen_is_bridge_object (GCObject *obj);
45 void sgen_mark_bridge_object (GCObject *obj);
47 gboolean sgen_bridge_handle_gc_debug (const char *opt);
48 void sgen_bridge_print_gc_debug_usage (void);
50 typedef struct {
51 void (*reset_data) (void);
52 void (*processing_stw_step) (void);
53 void (*processing_build_callback_data) (int generation);
54 void (*processing_after_callback) (int generation);
55 MonoGCBridgeObjectKind (*class_kind) (MonoClass *class);
56 void (*register_finalized_object) (GCObject *object);
57 void (*describe_pointer) (GCObject *object);
58 void (*enable_accounting) (void);
59 void (*set_dump_prefix) (const char *prefix);
62 * These are set by processing_build_callback_data().
64 int num_sccs;
65 MonoGCBridgeSCC **api_sccs;
67 int num_xrefs;
68 MonoGCBridgeXRef *api_xrefs;
69 } SgenBridgeProcessor;
71 void sgen_old_bridge_init (SgenBridgeProcessor *collector);
72 void sgen_new_bridge_init (SgenBridgeProcessor *collector);
73 void sgen_tarjan_bridge_init (SgenBridgeProcessor *collector);
74 void sgen_set_bridge_implementation (const char *name);
75 void sgen_bridge_set_dump_prefix (const char *prefix);
77 #endif
79 #endif