xref: /reactos/ntoskrnl/include/ntoskrnl.h (revision de972e2b)
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS Kernel
4  * FILE:            ntoskrnl/include/ntoskrnl.h
5  * PURPOSE:         Main Kernel Header
6  * PROGRAMMER:      Alex Ionescu (alex@relsoft.net)
7  */
8 
9 #ifndef _NTOSKRNL_PCH
10 #define _NTOSKRNL_PCH
11 
12 /* INCLUDES ******************************************************************/
13 
14 /* ARM Bringup Hack */
15 #ifdef _M_ARM
16 #define DbgPrint DbgPrintEarly
17 #endif
18 
19 /* WDK hacks */
20 #ifdef _M_AMD64
21 #define IoAllocateAdapterChannel _IoAllocateAdapterChannel
22 #define KeGetCurrentThread _KeGetCurrentThread
23 #define RtlFillMemoryUlong _RtlFillMemoryUlong
24 #endif
25 
26 /* Version Data */
27 #undef __MSVCRT__
28 #include <psdk/ntverp.h>
29 
30 /* DDK/IFS/NDK Headers */
31 #define _REALLY_GET_CALLERS_CALLER
32 #include <excpt.h>
33 #include <ntdef.h>
34 #include <ntifs.h>
35 #include <wdmguid.h>
36 #include <diskguid.h>
37 #include <arc/arc.h>
38 #include <mountmgr.h>
39 #undef NTHALAPI
40 #define NTHALAPI __declspec(dllimport)
41 #include <ndk/asm.h>
42 #include <ndk/cctypes.h>
43 #include <ndk/cmfuncs.h>
44 #include <ndk/dbgkfuncs.h>
45 #include <ndk/exfuncs.h>
46 #include <ndk/halfuncs.h>
47 #include <ndk/inbvfuncs.h>
48 #include <ndk/iofuncs.h>
49 #include <ndk/kdfuncs.h>
50 #include <ndk/kefuncs.h>
51 #include <ndk/ldrfuncs.h>
52 #include <ndk/lpcfuncs.h>
53 #include <ndk/mmfuncs.h>
54 #include <ndk/muptypes.h>
55 #include <ndk/obfuncs.h>
56 #include <ndk/pofuncs.h>
57 #include <ndk/psfuncs.h>
58 #include <ndk/rtlfuncs.h>
59 #include <ndk/sefuncs.h>
60 #include <ndk/vftypes.h>
61 
62 #undef TEXT
63 #define TEXT(s) L##s
64 
65 #define _IN_KERNEL_
66 #include <regstr.h>
67 
68 #include <ntstrsafe.h>
69 #include <ntpoapi.h>
70 #define ENABLE_INTSAFE_SIGNED_FUNCTIONS
71 #include <ntintsafe.h>
72 #undef ENABLE_INTSAFE_SIGNED_FUNCTIONS
73 
74 /* C Headers */
75 #include <stdlib.h>
76 #include <stdio.h>
77 #include <ctype.h>
78 #include <malloc.h>
79 #include <wchar.h>
80 
81 /* SEH support with PSEH */
82 #include <pseh/pseh2.h>
83 
84 /* SetupLDR Support */
85 #include <arc/setupblk.h>
86 
87 /* KD Support */
88 #define NOEXTAPI
89 #include <windbgkd.h>
90 #include <wdbgexts.h>
91 #ifdef KDBG
92 #define KdDebuggerInitialize0 KdpDebuggerInitialize0
93 #define KdDebuggerInitialize1 KdpDebuggerInitialize1
94 #define KdSendPacket KdpSendPacket
95 #define KdReceivePacket KdpReceivePacket
96 #endif
97 #include <kddll.h>
98 #ifdef __ROS_ROSSYM__
99 #include <reactos/rossym.h>
100 #endif
101 
102 /* PNP GUIDs */
103 #include <umpnpmgr/sysguid.h>
104 
105 /* SRM header */
106 #include <srmp.h>
107 
108 #define ExRaiseStatus RtlRaiseStatus
109 
110 /* Also defined in fltkernel.h, but we don't want the entire header */
111 #ifndef Add2Ptr
112 #define Add2Ptr(P,I) ((PVOID)((PUCHAR)(P) + (I)))
113 #endif
114 #ifndef PtrOffset
115 #define PtrOffset(B,O) ((ULONG)((ULONG_PTR)(O) - (ULONG_PTR)(B)))
116 #endif
117 
118 /* MAX_PATH is a Win32 concept, it doesn't belong in the kernel */
119 #define MAX_WIN32_PATH 260
120 C_ASSERT(MAX_WIN32_PATH == MAX_PATH);
121 #undef MAX_PATH
122 
123 /* Internal Headers */
124 #include "config.h"
125 #include "internal/ntoskrnl.h"
126 
127 #include <reactos/probe.h>
128 #include "internal/probe.h"
129 #include "resource.h"
130 
131 /* Internal Ps alignment probing header */
132 #include "internal/ps_i.h"
133 
134 #ifdef _MSC_VER
135 # pragma section("INITDATA", read,write,discard)
136 #endif
137 
138 #endif /* _NTOSKRNL_PCH */
139