File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,9 @@ This will put the current thread in GC Unsafe mode.
102102For further explanation of what can and can't be done in GC unsafe mode:
103103http://www.mono-project.com/docs/advanced/runtime/docs/coop-suspend/#gc-unsafe-mode
104104*/
105+
106+ #if defined(ENABLE_HYBRID_SUSPEND ) || defined(ENABLE_COOP_SUSPEND )
107+
105108#define MONO_ENTER_GC_UNSAFE \
106109do { \
107110MONO_STACKDATA (__gc_unsafe_dummy); \
@@ -133,6 +136,24 @@ For further explanation of what can and can't be done in GC unsafe mode:
133136MONO_STACKDATA (__gc_safe_unbalanced_dummy); \
134137mono_threads_enter_gc_safe_region_unbalanced_internal (&__gc_safe_unbalanced_dummy)
135138
139+ #else
140+
141+ #define MONO_ENTER_GC_UNSAFE do {
142+
143+ #define MONO_EXIT_GC_UNSAFE ; } while (0)
144+
145+ #define MONO_ENTER_GC_UNSAFE_UNBALANCED do {
146+
147+ #define MONO_EXIT_GC_UNSAFE_UNBALANCED ; } while (0)
148+
149+ #define MONO_ENTER_GC_SAFE do {
150+
151+ #define MONO_EXIT_GC_SAFE ; } while (0)
152+
153+ #define MONO_ENTER_GC_SAFE_UNBALANCED
154+
155+ #endif
156+
136157void
137158mono_threads_enter_no_safepoints_region (const char * func );
138159
You can’t perform that action at this time.
0 commit comments