From a38d7cdb2ad56f1ab20d060bf8e6f1bd80059709 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Tue, 17 Sep 2019 14:39:09 -0700 Subject: [PATCH] All existing safepoints appear to be mooted by pinned coop handles. (mono/mono#16695) Perhaps they are never needed then. Commit migrated from https://github.com/mono/mono/commit/12c48df242f61c6e028030499a43b140f41873e1 --- src/mono/mono/utils/mono-threads-api.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/mono/mono/utils/mono-threads-api.h b/src/mono/mono/utils/mono-threads-api.h index d053320..c8e3410 100644 --- a/src/mono/mono/utils/mono-threads-api.h +++ b/src/mono/mono/utils/mono-threads-api.h @@ -144,6 +144,7 @@ mono_threads_enter_no_safepoints_region (const char *func); void mono_threads_exit_no_safepoints_region (const char *func); +#if 0 #define MONO_ENTER_NO_SAFEPOINTS \ do { \ do { \ @@ -155,6 +156,14 @@ mono_threads_exit_no_safepoints_region (const char *func); if (mono_threads_are_safepoints_enabled ()) \ mono_threads_exit_no_safepoints_region (__func__); \ } while (0) +#else + +// With pinned handles, safepoints become not needed, as long as pinned handles are used. + +#define MONO_ENTER_NO_SAFEPOINTS /* nothing */ +#define MONO_EXIT_NO_SAFEPOINTS /* nothing */ + +#endif MONO_API MONO_RT_EXTERNAL_ONLY void mono_thread_set_coop_aware (void); -- 2.7.4