[threads] Remove mono_threads_suspend_needs_abort_syscall (#4450)
authorLudovic Henry <ludovic@xamarin.com>
Thu, 2 Mar 2017 14:55:31 +0000 (09:55 -0500)
committerGitHub <noreply@github.com>
Thu, 2 Mar 2017 14:55:31 +0000 (09:55 -0500)
mono/utils/mono-threads-mach.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads-windows.c
mono/utils/mono-threads.c
mono/utils/mono-threads.h

index fdf18bb1891eeb47c08ec7e6176341912fe57b03..3dd01e8a21dc0e267c4e2f457edd325a47ca52d2 100644 (file)
@@ -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
index 2b48be021d9a2e7112a24b715dd87a5fca9ef2b2..be4be1543011029f7ff2ec1b76d48172a513085b 100644 (file)
@@ -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)
 {
index 2a28e9b5a13ab6fac7ed0e76c751e68101d43e48..91ce0f6ea4942b68469d657111245c025499675e 100644 (file)
@@ -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)
 {
index 76821d0d359980fb78176606d20a210f61b48b0f..30ea1db19ad2af0ee2ca08babf7ed8d72aff2173 100644 (file)
@@ -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 ();
index 344fbdec3c89bda1e4de22e147f47ad8a15810d1..f0410e3132e0ae0cd8a96e1ef47d3a5a7f060263 100644 (file)
@@ -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);