Reduce TLS accesses. (#11487)
[mono-project.git] / mono / metadata / console-win32-uwp.c
blob5e7c4954fcbfc02c82d18bdd6d5694637e84daf1
1 /**
2 * \file
3 * UWP console support for Mono.
5 * Copyright 2016 Microsoft
6 * Licensed under the MIT license. See LICENSE file in the project root for full license information.
7 */
8 #include <config.h>
9 #include <glib.h>
10 #include "mono/utils/mono-compiler.h"
12 #if G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT)
13 #include <windows.h>
14 #include "mono/metadata/console-win32-internals.h"
16 MonoBoolean
17 ves_icall_System_ConsoleDriver_Isatty (HANDLE handle, MonoError* error)
19 g_unsupported_api ("Console");
21 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "Console");
23 SetLastError (ERROR_NOT_SUPPORTED);
25 return FALSE;
28 MonoBoolean
29 ves_icall_System_ConsoleDriver_SetEcho (MonoBoolean want_echo, MonoError* error)
31 g_unsupported_api ("Console");
33 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "Console");
35 SetLastError (ERROR_NOT_SUPPORTED);
37 return FALSE;
40 MonoBoolean
41 ves_icall_System_ConsoleDriver_SetBreak (MonoBoolean want_break, MonoError* error)
43 g_unsupported_api ("Console");
45 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "Console");
47 SetLastError (ERROR_NOT_SUPPORTED);
49 return FALSE;
52 gint32
53 ves_icall_System_ConsoleDriver_InternalKeyAvailable (gint32 timeout, MonoError* error)
55 g_unsupported_api ("Console");
57 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "Console");
59 SetLastError (ERROR_NOT_SUPPORTED);
61 return FALSE;
64 MonoBoolean
65 ves_icall_System_ConsoleDriver_TtySetup (MonoStringHandle keypad, MonoStringHandle teardown, MonoArrayHandleOut control_chars, int **size, MonoError* error)
67 g_unsupported_api ("Console");
69 mono_error_set_not_supported (error, G_UNSUPPORTED_API, "Console");
71 SetLastError (ERROR_NOT_SUPPORTED);
73 return FALSE;
76 #else /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */
78 MONO_EMPTY_SOURCE_FILE (console_win32_uwp);
79 #endif /* G_HAVE_API_SUPPORT(HAVE_UWP_WINAPI_SUPPORT) */