f6fdd18ac4b8ce5c57f9d132a4eed8326b0a23e1
[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 <ntos.h>
14 #include <internal/ke.h>
15 #include <internal/ps.h>
16
17 #define NDEBUG
18 #include <debug.h>
19
20 /* FUNCTIONS ***************************************************************/
21
22 #if 1
23 VOID STDCALL
24 MsvcrtDebug(ULONG Value)
25 {
26 DbgPrint("KernelDebug 0x%.08x\n", Value);
27 }
28 #endif
29
30 #if !defined(_MSC_VER)
31 /*
32 * When compiling this file with MSVC itself, don't compile these functions.
33 * They are replacements for MS compiler and/or C runtime library functions,
34 * which are already provided by the MSVC compiler and C runtime library.
35 */
36
37 /*
38 * @implemented
39 */
40 int
41 _abnormal_termination(void)
42 {
43 DbgPrint("Abnormal Termination\n");
44 return 0;
45 }
46
47 struct _CONTEXT;
48
49 /*
50 * @implemented
51 */
52 EXCEPTION_DISPOSITION
53 _except_handler2(
54 struct _EXCEPTION_RECORD *ExceptionRecord,
55 void *RegistrationFrame,
56 struct _CONTEXT *ContextRecord,
57 void *DispatcherContext)
58 {
59 DbgPrint("_except_handler2()\n");
60 return (EXCEPTION_DISPOSITION)0;
61 }
62
63 /*
64 * @implemented
65 */
66 void __cdecl
67 _global_unwind2(PEXCEPTION_REGISTRATION RegistrationFrame)
68 {
69 RtlUnwind(RegistrationFrame, &&__ret_label, NULL, 0);
70 __ret_label:
71 // return is important
72 return;
73 }
74
75 #endif /* _MSC_VER */
76
77 /* EOF */