[corlib] RemotingConfiguration now try to use the bundled machine.config first.
[mono.git] / mono / utils / mono-threads-windows-abort-syscall.c
1 /*
2  * mono-threads-windows-abort-syscall.c: Low-level syscall aborting
3  *
4  * Author:
5  *      Ludovic Henry (ludovic@xamarin.com)
6  *
7  * (C) 2015 Xamarin, Inc
8  */
9
10 #include "config.h"
11 #include <glib.h>
12
13 #include <mono/utils/mono-threads.h>
14
15 #if defined(USE_WINDOWS_BACKEND)
16
17 #include <limits.h>
18
19 void
20 mono_threads_abort_syscall_init (void)
21 {
22 }
23
24 static void CALLBACK
25 abort_apc (ULONG_PTR param)
26 {
27 }
28
29 void
30 mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
31 {
32         DWORD id = mono_thread_info_get_tid (info);
33         HANDLE handle;
34
35         handle = OpenThread (THREAD_ALL_ACCESS, FALSE, id);
36         g_assert (handle);
37
38         QueueUserAPC ((PAPCFUNC)abort_apc, handle, (ULONG_PTR)NULL);
39
40         CloseHandle (handle);
41 }
42
43 gboolean
44 mono_threads_suspend_needs_abort_syscall (void)
45 {
46         return TRUE;
47 }
48
49 #endif