From 1057fcddc1219d3bca12838b029b33fbe45d741e Mon Sep 17 00:00:00 2001 From: Nathan Ricci Date: Wed, 21 Aug 2019 15:54:07 -0400 Subject: [PATCH] Took changes from miguel's branch. Commit migrated from https://github.com/mono/mono/commit/56f44379d0eaf22fca1980ef7023032e37ce2bd4 --- src/mono/mono/metadata/boehm-gc.c | 12 ++++++++++++ src/mono/mono/metadata/mono-gc.h | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/src/mono/mono/metadata/boehm-gc.c b/src/mono/mono/metadata/boehm-gc.c index 8414e24..71225b3 100644 --- a/src/mono/mono/metadata/boehm-gc.c +++ b/src/mono/mono/metadata/boehm-gc.c @@ -347,6 +347,18 @@ mono_gc_collection_count (int generation) return GC_gc_no; } +void +mono_gc_stop_world () +{ + g_assert ("mono_gc_stop_world is not supported in Boehm"); +} + +void +mono_gc_restart_world () +{ + g_assert ("mono_gc_restart_world is not supported in Boehm"); +} + /** * mono_gc_add_memory_pressure: * \param value amount of bytes diff --git a/src/mono/mono/metadata/mono-gc.h b/src/mono/mono/metadata/mono-gc.h index 247e32e..5d7f465 100644 --- a/src/mono/mono/metadata/mono-gc.h +++ b/src/mono/mono/metadata/mono-gc.h @@ -119,6 +119,12 @@ MONO_API int mono_gc_invoke_finalizers (void); /* heap walking is only valid in the pre-stop-world event callback */ MONO_API int mono_gc_walk_heap (int flags, MonoGCReferences callback, void *data); +/* + * Only supported under SGen. These two with Sgen will take and release the LOCK_GC + */ +void mono_gc_stop_world (void); +void mono_gc_restart_world (void); + MONO_END_DECLS #endif /* __METADATA_MONO_GC_H__ */ -- 2.7.4