c2367aae9c2a046301d5b140a070a17f795881a7
[mono.git] / mono / mini / mini-windows-uwp.c
1 /*
2  * mini-windows-uwp.c: UWP profiler stat support for Mono.
3  *
4  * Copyright 2016 Microsoft
5  * Licensed under the MIT license. See LICENSE file in the project root for full license information.
6  */
7 #include <config.h>
8 #include <glib.h>
9
10 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
11 #include <Windows.h>
12
13 void
14 mono_runtime_setup_stat_profiler (void)
15 {
16         g_unsupported_api ("OpenThread, GetThreadContext");
17         SetLastError (ERROR_NOT_SUPPORTED);
18         return;
19 }
20
21 void
22 mono_runtime_shutdown_stat_profiler (void)
23 {
24         g_unsupported_api ("OpenThread, GetThreadContext");
25         SetLastError (ERROR_NOT_SUPPORTED);
26         return;
27 }
28
29 static gboolean
30 mono_setup_thread_context(DWORD thread_id, MonoContext *mono_context)
31 {
32         memset (mono_context, 0, sizeof (MonoContext));
33         return FALSE;
34 }
35
36 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
37
38 #ifdef _MSC_VER
39 // Quiet Visual Studio linker warning, LNK4221, in cases when this source file intentional ends up empty.
40 void __mono_win32_mini_windows_uwp_quiet_lnk4221(void) {}
41 #endif
42 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
43