Use W32API for NTOSKRNL.
[reactos.git] / reactos / ntoskrnl / rtl / i386 / exception.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/rtl/i386/exception.c
6 * PURPOSE: Kernel-mode exception support for IA-32
7 *
8 * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
9 */
10
11 /* INCLUDES *****************************************************************/
12
13 #include <ntoskrnl.h>
14
15 #define NDEBUG
16 #include <debug.h>
17
18 /* FUNCTIONS ***************************************************************/
19
20 #if 1
21 VOID STDCALL
22 MsvcrtDebug(ULONG Value)
23 {
24 DbgPrint("KernelDebug 0x%.08x\n", Value);
25 }
26 #endif
27
28 #if !defined(_MSC_VER)
29 /*
30 * When compiling this file with MSVC itself, don't compile these functions.
31 * They are replacements for MS compiler and/or C runtime library functions,
32 * which are already provided by the MSVC compiler and C runtime library.
33 */
34
35 /*
36 * @implemented
37 */
38 int
39 _abnormal_termination(void)
40 {
41 DbgPrint("Abnormal Termination\n");
42 return 0;
43 }
44
45 struct _CONTEXT;
46
47 /*
48 * @implemented
49 */
50 EXCEPTION_DISPOSITION
51 _except_handler2(
52 struct _EXCEPTION_RECORD *ExceptionRecord,
53 void *RegistrationFrame,
54 struct _CONTEXT *ContextRecord,
55 void *DispatcherContext)
56 {
57 DbgPrint("_except_handler2()\n");
58 return (EXCEPTION_DISPOSITION)0;
59 }
60
61 /*
62 * @implemented
63 */
64 void __cdecl
65 _global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame)
66 {
67 RtlUnwind(RegistrationFrame, &&__ret_label, NULL, 0);
68 __ret_label:
69 // return is important
70 return;
71 }
72
73 #endif /* _MSC_VER */
74
75 /* EOF */