fdd208b679ed243b5a7f26fb8b94bc97b09e4c01
[reactos.git] / reactos / include / ntos / krnltypes.h
1 /*
2 * FIXME: *** NDK ***
3 */
4
5 #ifndef __INCLUDE_NTOS_KRNLTYPES_H
6 #define __INCLUDE_NTOS_KRNLTYPES_H
7
8 #define DOE_UNLOAD_PENDING 0x1
9 #define DOE_DELETE_PENDING 0x2
10 #define DOE_REMOVE_PENDING 0x4
11 #define DOE_REMOVE_PROCESSED 0x8
12 #define DOE_START_PENDING 0x10
13
14 extern POBJECT_TYPE EXPORTED ExMutantObjectType;
15 extern POBJECT_TYPE EXPORTED ExTimerType;
16
17 /*
18 * PURPOSE: Special timer associated with each device
19 */
20 typedef struct _IO_TIMER {
21 USHORT Type; /* Every IO Object has a Type */
22 USHORT TimerEnabled; /* Tells us if the Timer is enabled or not */
23 LIST_ENTRY IoTimerList; /* List of other Timers on the system */
24 PIO_TIMER_ROUTINE TimerRoutine; /* The associated timer routine */
25 PVOID Context; /* Context */
26 PDEVICE_OBJECT DeviceObject; /* Driver that owns this IO Timer */
27 } IO_TIMER, *PIO_TIMER;
28
29 typedef struct _EX_QUEUE_WORKER_INFO {
30 UCHAR QueueDisabled:1;
31 UCHAR MakeThreadsAsNecessary:1;
32 UCHAR WaitMode:1;
33 ULONG WorkerCount:29;
34 } EX_QUEUE_WORKER_INFO, *PEX_QUEUE_WORKER_INFO;
35
36 typedef struct _EX_WORK_QUEUE {
37 KQUEUE WorkerQueue;
38 ULONG DynamicThreadCount;
39 ULONG WorkItemsProcessed;
40 ULONG WorkItemsProcessedLastPass;
41 ULONG QueueDepthLastPass;
42 EX_QUEUE_WORKER_INFO Info;
43 } EX_WORK_QUEUE, *PEX_WORK_QUEUE;
44
45 typedef struct _KDPC_DATA
46 {
47 LIST_ENTRY DpcListHead;
48 ULONG DpcLock;
49 ULONG DpcQueueDepth;
50 ULONG DpcCount;
51 } KDPC_DATA, *PKDPC_DATA;
52
53 typedef struct _KTRAP_FRAME
54 {
55 PVOID DebugEbp;
56 PVOID DebugEip;
57 PVOID DebugArgMark;
58 PVOID DebugPointer;
59 PVOID TempCs;
60 PVOID TempEip;
61 ULONG Dr0;
62 ULONG Dr1;
63 ULONG Dr2;
64 ULONG Dr3;
65 ULONG Dr6;
66 ULONG Dr7;
67 USHORT Gs;
68 USHORT Reserved1;
69 USHORT Es;
70 USHORT Reserved2;
71 USHORT Ds;
72 USHORT Reserved3;
73 ULONG Edx;
74 ULONG Ecx;
75 ULONG Eax;
76 ULONG PreviousMode;
77 PVOID ExceptionList;
78 USHORT Fs;
79 USHORT Reserved4;
80 ULONG Edi;
81 ULONG Esi;
82 ULONG Ebx;
83 ULONG Ebp;
84 ULONG ErrorCode;
85 ULONG Eip;
86 ULONG Cs;
87 ULONG Eflags;
88 ULONG Esp;
89 USHORT Ss;
90 USHORT Reserved5;
91 USHORT V86_Es;
92 USHORT Reserved6;
93 USHORT V86_Ds;
94 USHORT Reserved7;
95 USHORT V86_Fs;
96 USHORT Reserved8;
97 USHORT V86_Gs;
98 USHORT Reserved9;
99 } KTRAP_FRAME, *PKTRAP_FRAME;
100
101 typedef struct _PP_LOOKASIDE_LIST
102 {
103 struct _GENERAL_LOOKASIDE *P;
104 struct _GENERAL_LOOKASIDE *L;
105 } PP_LOOKASIDE_LIST, *PPP_LOOKASIDE_LIST;
106
107 typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
108 {
109 LookasideSmallIrpList = 0,
110 LookasideLargeIrpList = 1,
111 LookasideMdlList = 2,
112 LookasideCreateInfoList = 3,
113 LookasideNameBufferList = 4,
114 LookasideTwilightList = 5,
115 LookasideCompletionList = 6,
116 LookasideMaximumList = 7
117 } PP_NPAGED_LOOKASIDE_NUMBER;
118
119 typedef enum _KOBJECTS {
120 EventNotificationObject = 0,
121 EventSynchronizationObject = 1,
122 MutantObject = 2,
123 ProcessObject = 3,
124 QueueObject = 4,
125 SemaphoreObject = 5,
126 ThreadObject = 6,
127 GateObject = 7,
128 TimerNotificationObject = 8,
129 TimerSynchronizationObject = 9,
130 Spare2Object = 10,
131 Spare3Object = 11,
132 Spare4Object = 12,
133 Spare5Object = 13,
134 Spare6Object = 14,
135 Spare7Object = 15,
136 Spare8Object = 16,
137 Spare9Object = 17,
138 ApcObject = 18,
139 DpcObject = 19,
140 DeviceQueueObject = 20,
141 EventPairObject = 21,
142 InterruptObject = 22,
143 ProfileObject = 23,
144 ThreadedDpcObject = 24,
145 MaximumKernelObject = 25
146 } KOBJECTS;
147
148 typedef struct _M128 {
149 ULONGLONG Low;
150 LONGLONG High;
151 } M128, *PM128;
152
153 typedef struct _KEXCEPTION_FRAME {
154 ULONG64 P1Home;
155 ULONG64 P2Home;
156 ULONG64 P3Home;
157 ULONG64 P4Home;
158 ULONG64 P5;
159 ULONG64 InitialStack;
160 M128 Xmm6;
161 M128 Xmm7;
162 M128 Xmm8;
163 M128 Xmm9;
164 M128 Xmm10;
165 M128 Xmm11;
166 M128 Xmm12;
167 M128 Xmm13;
168 M128 Xmm14;
169 M128 Xmm15;
170 ULONG64 TrapFrame;
171 ULONG64 CallbackStack;
172 ULONG64 OutputBuffer;
173 ULONG64 OutputLength;
174 UCHAR ExceptionRecord[64];
175 ULONG64 Fill1;
176 ULONG64 Rbp;
177 ULONG64 Rbx;
178 ULONG64 Rdi;
179 ULONG64 Rsi;
180 ULONG64 R12;
181 ULONG64 R13;
182 ULONG64 R14;
183 ULONG64 R15;
184 ULONG64 Return;
185 } KEXCEPTION_FRAME, *PKEXCEPTION_FRAME;
186
187 typedef struct _KEVENT_PAIR
188 {
189 CSHORT Type;
190 CSHORT Size;
191 KEVENT LowEvent;
192 KEVENT HighEvent;
193 } KEVENT_PAIR, *PKEVENT_PAIR;
194
195 typedef struct _RUNDOWN_DESCRIPTOR {
196 ULONG_PTR References;
197 KEVENT RundownEvent;
198 } RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR;
199
200 #endif /* __INCLUDE_NTOS_KRNLTYPES_H */
201