From 3f864441124a51839a3324de8c430c614ea44f3a Mon Sep 17 00:00:00 2001 From: Ludovic Henry Date: Thu, 2 Mar 2017 09:55:31 -0500 Subject: [PATCH] [threads] Remove mono_threads_suspend_needs_abort_syscall (#4450) --- mono/utils/mono-threads-mach.c | 13 ------------- mono/utils/mono-threads-posix.c | 6 ------ mono/utils/mono-threads-windows.c | 6 ------ mono/utils/mono-threads.c | 4 ++-- mono/utils/mono-threads.h | 1 - 5 files changed, 2 insertions(+), 28 deletions(-) diff --git a/mono/utils/mono-threads-mach.c b/mono/utils/mono-threads-mach.c index fdf18bb1891..3dd01e8a21d 100644 --- a/mono/utils/mono-threads-mach.c +++ b/mono/utils/mono-threads-mach.c @@ -54,13 +54,6 @@ mono_threads_suspend_begin_async_resume (MonoThreadInfo *info) void mono_threads_suspend_abort_syscall (MonoThreadInfo *info) { - g_assert_not_reached (); -} - -gboolean -mono_threads_suspend_needs_abort_syscall (void) -{ - return FALSE; } #else /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */ @@ -193,12 +186,6 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info) g_assert (ret == KERN_SUCCESS); } -gboolean -mono_threads_suspend_needs_abort_syscall (void) -{ - return TRUE; -} - #endif /* defined(HOST_WATCHOS) || defined(HOST_TVOS) */ void diff --git a/mono/utils/mono-threads-posix.c b/mono/utils/mono-threads-posix.c index 2b48be021d9..be4be154301 100644 --- a/mono/utils/mono-threads-posix.c +++ b/mono/utils/mono-threads-posix.c @@ -328,12 +328,6 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info) } } -gboolean -mono_threads_suspend_needs_abort_syscall (void) -{ - return TRUE; -} - void mono_threads_suspend_register (MonoThreadInfo *info) { diff --git a/mono/utils/mono-threads-windows.c b/mono/utils/mono-threads-windows.c index 2a28e9b5a13..91ce0f6ea49 100644 --- a/mono/utils/mono-threads-windows.c +++ b/mono/utils/mono-threads-windows.c @@ -94,12 +94,6 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info) CloseHandle (handle); } -gboolean -mono_threads_suspend_needs_abort_syscall (void) -{ - return TRUE; -} - gboolean mono_threads_suspend_begin_async_resume (MonoThreadInfo *info) { diff --git a/mono/utils/mono-threads.c b/mono/utils/mono-threads.c index 76821d0d359..30ea1db19ad 100644 --- a/mono/utils/mono-threads.c +++ b/mono/utils/mono-threads.c @@ -903,7 +903,7 @@ suspend_sync (MonoNativeThreadId tid, gboolean interrupt_kernel) } break; case AsyncSuspendBlocking: - if (interrupt_kernel && mono_threads_suspend_needs_abort_syscall ()) + if (interrupt_kernel) mono_threads_suspend_abort_syscall (info); break; @@ -1067,7 +1067,7 @@ mono_thread_info_abort_socket_syscall_for_close (MonoNativeThreadId tid) MonoThreadHazardPointers *hp; MonoThreadInfo *info; - if (tid == mono_native_thread_id_get () || !mono_threads_suspend_needs_abort_syscall ()) + if (tid == mono_native_thread_id_get ()) return; hp = mono_hazard_pointer_get (); diff --git a/mono/utils/mono-threads.h b/mono/utils/mono-threads.h index 344fbdec3c8..f0410e3132e 100644 --- a/mono/utils/mono-threads.h +++ b/mono/utils/mono-threads.h @@ -476,7 +476,6 @@ gboolean mono_threads_suspend_begin_async_resume (THREAD_INFO_TYPE *info); void mono_threads_suspend_register (THREAD_INFO_TYPE *info); //ok void mono_threads_suspend_free (THREAD_INFO_TYPE *info); void mono_threads_suspend_abort_syscall (THREAD_INFO_TYPE *info); -gboolean mono_threads_suspend_needs_abort_syscall (void); gint mono_threads_suspend_search_alternative_signal (void); gint mono_threads_suspend_get_suspend_signal (void); gint mono_threads_suspend_get_restart_signal (void); -- 2.25.1