From 86093bbe486756a34e69e2ae084a637216ea4854 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joa=CC=83o=20Matos?= Date: Thu, 19 Mar 2015 17:21:45 +0000 Subject: [PATCH] [windows] Fixed thread async suspend assert. This should be asserting for 1 instead of 0, this way we actually assert that the thread was resumed. --- mono/utils/mono-threads-windows.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mono/utils/mono-threads-windows.c b/mono/utils/mono-threads-windows.c index e119a36f1ec..27d6d15d998 100755 --- a/mono/utils/mono-threads-windows.c +++ b/mono/utils/mono-threads-windows.c @@ -74,7 +74,7 @@ mono_threads_core_begin_async_suspend (MonoThreadInfo *info, gboolean interrupt_ if (!mono_threads_transition_finish_async_suspend (info)) { mono_threads_add_to_pending_operation_set (info); result = ResumeThread (handle); - g_assert (result == 0); + g_assert (result == 1); CloseHandle (handle); THREADS_SUSPEND_DEBUG ("FAILSAFE RESUME/1 %p -> %d\n", (void*)id, 0); //XXX interrupt_kernel doesn't make sense in this case as the target is not in a syscall @@ -89,7 +89,7 @@ mono_threads_core_begin_async_suspend (MonoThreadInfo *info, gboolean interrupt_ } else { mono_threads_transition_async_suspend_compensation (info); result = ResumeThread (handle); - g_assert (result == 0); + g_assert (result == 1); THREADS_SUSPEND_DEBUG ("FAILSAFE RESUME/2 %p -> %d\n", (void*)info->native_handle, 0); } -- 2.25.1