From 86155e72da0aa0cc1e546dd2dd5acee0db398c38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20Matos?= Date: Mon, 16 Mar 2015 13:50:38 +0000 Subject: [PATCH] [msvc] Renamed ResumeThread since it conflicts with a Windows function. --- mono/metadata/threads.c | 12 ++++++------ mono/utils/mono-threads.c | 2 +- mono/utils/mono-threads.h | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mono/metadata/threads.c b/mono/metadata/threads.c index f590aabc26b..68a4d9b9b3a 100644 --- a/mono/metadata/threads.c +++ b/mono/metadata/threads.c @@ -3262,7 +3262,7 @@ print_thread_dump (MonoThreadInfo *info, gpointer ud) g_string_free (text, TRUE); fflush (stdout); - return ResumeThread; + return MonoResumeThread; } static void @@ -4605,11 +4605,11 @@ abort_thread_critical (MonoThreadInfo *info, gpointer ud) gboolean running_managed; if (mono_get_eh_callbacks ()->mono_install_handler_block_guard (mono_thread_info_get_suspend_state (info))) - return ResumeThread; + return MonoResumeThread; /*someone is already interrupting it*/ if (InterlockedCompareExchange (&thread->interruption_requested, 1, 0) == 1) - return ResumeThread; + return MonoResumeThread; InterlockedIncrement (&thread_interruption_requested); @@ -4622,7 +4622,7 @@ abort_thread_critical (MonoThreadInfo *info, gpointer ud) /*Set the thread to call */ if (data->install_async_abort) mono_thread_info_setup_async_call (info, self_interrupt_thread, NULL); - return ResumeThread; + return MonoResumeThread; } else { if (mono_thread_notify_pending_exc_fn) /* The JIT will notify the thread about the interruption */ @@ -4636,7 +4636,7 @@ abort_thread_critical (MonoThreadInfo *info, gpointer ud) * make it return. */ data->interrupt_handle = mono_thread_info_prepare_interrupt (thread->handle); - return ResumeThread; + return MonoResumeThread; } } @@ -4703,7 +4703,7 @@ suspend_thread_critical (MonoThreadInfo *info, gpointer ud) if (mono_thread_notify_pending_exc_fn && !running_managed) /* The JIT will notify the thread about the interruption */ mono_thread_notify_pending_exc_fn (info); - return ResumeThread; + return MonoResumeThread; } } diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index c80a2405aab..b2c2f03a205 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -844,7 +844,7 @@ mono_thread_info_safe_suspend_and_run (MonoNativeThreadId id, gboolean interrupt goto done; switch (result = callback (info, user_data)) { - case ResumeThread: + case MonoResumeThread: mono_hazard_pointer_set (hp, 1, info); mono_thread_info_core_resume (info); mono_threads_wait_pending_operations (); diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h index 61cafd13414..d2beb2e0d1f 100644 --- a/mono/utils/mono-threads.h +++ b/mono/utils/mono-threads.h @@ -264,7 +264,7 @@ typedef struct { //Not using 0 and 1 to ensure callbacks are not returning bad data typedef enum { - ResumeThread = 0x1234, + MonoResumeThread = 0x1234, KeepSuspended = 0x4321, } SuspendThreadResult; -- 2.25.1