ReactOS  0.4.15-dev-2531-g03e8246
ketypes.h
Go to the documentation of this file.
1 /*++ NDK Version: 0098
2 
3 Copyright (c) Alex Ionescu. All rights reserved.
4 
5 Header Name:
6 
7  ketypes.h
8 
9 Abstract:
10 
11  Type definitions for the Kernel services.
12 
13 Author:
14 
15  Alex Ionescu (alexi@tinykrnl.org) - Updated - 27-Feb-2006
16 
17 --*/
18 
19 #ifndef _KETYPES_H
20 #define _KETYPES_H
21 
22 //
23 // Dependencies
24 //
25 #include <umtypes.h>
26 #ifndef NTOS_MODE_USER
27 #include <haltypes.h>
28 #include <potypes.h>
29 #include <ifssupp.h>
30 #endif
31 
32 //
33 // A system call ID is formatted as such:
34 // .________________________________________________________________.
35 // | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
36 // |--------------|-------------------------------------------------|
37 // | TABLE NUMBER | TABLE OFFSET |
38 // \----------------------------------------------------------------/
39 //
40 // The table number is then used as an index into the service descriptor table.
41 #define TABLE_NUMBER_BITS 1
42 #define TABLE_OFFSET_BITS 12
43 
44 //
45 // There are 2 tables (kernel and shadow, used by Win32K)
46 //
47 #define NUMBER_SERVICE_TABLES 2
48 #define NTOS_SERVICE_INDEX 0
49 #define WIN32K_SERVICE_INDEX 1
50 
51 //
52 // NB. From assembly code, the table number must be computed as an offset into
53 // the service descriptor table.
54 //
55 // Each entry into the table is 16 bytes long on 32-bit architectures, and
56 // 32 bytes long on 64-bit architectures.
57 //
58 // Thus, Table Number 1 is offset 16 (0x10) on x86, and offset 32 (0x20) on
59 // x64.
60 //
61 #ifdef _WIN64
62 #define BITS_PER_ENTRY 5 // (1 << 5) = 32 bytes
63 #else
64 #define BITS_PER_ENTRY 4 // (1 << 4) = 16 bytes
65 #endif
66 
67 //
68 // We want the table number, but leave some extra bits to we can have the offset
69 // into the descriptor table.
70 //
71 #define SERVICE_TABLE_SHIFT (12 - BITS_PER_ENTRY)
72 
73 //
74 // Now the table number (as an offset) is corrupted with part of the table offset
75 // This mask will remove the extra unwanted bits, and give us the offset into the
76 // descriptor table proper.
77 //
78 #define SERVICE_TABLE_MASK (((1 << TABLE_NUMBER_BITS) - 1) << BITS_PER_ENTRY)
79 
80 //
81 // To get the table offset (ie: the service call number), just keep the 12 bits
82 //
83 #define SERVICE_NUMBER_MASK ((1 << TABLE_OFFSET_BITS) - 1)
84 
85 //
86 // We'll often need to check if this is a graphics call. This is done by comparing
87 // the table number offset with the known Win32K table number offset.
88 // This is usually index 1, so table number offset 0x10 (x86) or 0x20 (x64)
89 //
90 #define SERVICE_TABLE_TEST (WIN32K_SERVICE_INDEX << BITS_PER_ENTRY)
91 
92 //
93 // Context Record Flags
94 //
95 #define CONTEXT_DEBUGGER (CONTEXT_FULL | CONTEXT_FLOATING_POINT)
96 
97 //
98 // Maximum System Descriptor Table Entries
99 //
100 #define SSDT_MAX_ENTRIES 2
101 
102 //
103 // Processor Architectures
104 //
105 #define PROCESSOR_ARCHITECTURE_INTEL 0
106 #define PROCESSOR_ARCHITECTURE_MIPS 1
107 #define PROCESSOR_ARCHITECTURE_ALPHA 2
108 #define PROCESSOR_ARCHITECTURE_PPC 3
109 #define PROCESSOR_ARCHITECTURE_SHX 4
110 #define PROCESSOR_ARCHITECTURE_ARM 5
111 #define PROCESSOR_ARCHITECTURE_IA64 6
112 #define PROCESSOR_ARCHITECTURE_ALPHA64 7
113 #define PROCESSOR_ARCHITECTURE_MSIL 8
114 #define PROCESSOR_ARCHITECTURE_AMD64 9
115 #define PROCESSOR_ARCHITECTURE_UNKNOWN 0xFFFF
116 
117 //
118 // Object Type Mask for Kernel Dispatcher Objects
119 //
120 #define KOBJECT_TYPE_MASK 0x7F
121 #define KOBJECT_LOCK_BIT 0x80
122 
123 //
124 // Dispatcher Priority increments
125 //
126 #define THREAD_ALERT_INCREMENT 2
127 
128 //
129 // Physical memory offset of KUSER_SHARED_DATA
130 //
131 #define KI_USER_SHARED_DATA_PHYSICAL 0x41000
132 
133 //
134 // Quantum values and decrements
135 //
136 #define MAX_QUANTUM 0x7F
137 #define WAIT_QUANTUM_DECREMENT 1
138 #define CLOCK_QUANTUM_DECREMENT 3
139 
140 //
141 // Kernel Feature Bits
142 //
143 #define KF_V86_VIS 0x00000001
144 #define KF_RDTSC 0x00000002
145 #define KF_CR4 0x00000004
146 #define KF_CMOV 0x00000008
147 #define KF_GLOBAL_PAGE 0x00000010
148 #define KF_LARGE_PAGE 0x00000020
149 #define KF_MTRR 0x00000040
150 #define KF_CMPXCHG8B 0x00000080
151 #define KF_MMX 0x00000100
152 #define KF_WORKING_PTE 0x00000200
153 #define KF_PAT 0x00000400
154 #define KF_FXSR 0x00000800
155 #define KF_FAST_SYSCALL 0x00001000
156 #define KF_XMMI 0x00002000
157 #define KF_3DNOW 0x00004000
158 #define KF_AMDK6MTRR 0x00008000
159 #define KF_XMMI64 0x00010000
160 #define KF_DTS 0x00020000
161 #define KF_BRANCH 0x00020000 // from ksamd64.inc
162 #define KF_SSE3 0x00080000
163 #define KF_CMPXCHG16B 0x00100000
164 #define KF_XSTATE 0x00800000 // from ks386.inc, ksamd64.inc
165 #define KF_NX_BIT 0x20000000
166 #define KF_NX_DISABLED 0x40000000
167 #define KF_NX_ENABLED 0x80000000
168 
169 #define KF_XSAVEOPT_BIT 15
170 #define KF_XSTATE_BIT 23
171 #define KF_RDWRFSGSBASE_BIT 28
172 
173 //
174 // Internal Exception Codes
175 //
176 #define KI_EXCEPTION_INTERNAL 0x10000000
177 #define KI_EXCEPTION_ACCESS_VIOLATION (KI_EXCEPTION_INTERNAL | 0x04)
178 
179 typedef struct _FIBER /* Field offsets: */
180 { /* i386 arm x64 */
181  PVOID FiberData; /* 0x000 0x000 0x000 */
182  struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList;/* 0x004 0x004 0x008 */
183  PVOID StackBase; /* 0x008 0x008 0x010 */
184  PVOID StackLimit; /* 0x00C 0x00C 0x018 */
185  PVOID DeallocationStack; /* 0x010 0x010 0x020 */
186  CONTEXT FiberContext; /* 0x014 0x018 0x030 */
187 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
188  PVOID Wx86Tib; /* 0x2E0 0x1b8 0x500 */
190  PVOID FlsData; /* 0x2E8 0x1c0 0x510 */
191  ULONG GuaranteedStackBytes; /* 0x2EC 0x1c4 0x518 */
192  ULONG TebFlags; /* 0x2F0 0x1c8 0x51C */
193 #else
194  ULONG GuaranteedStackBytes; /* 0x2E0 */
195  PVOID FlsData; /* 0x2E4 */
197 #endif
198 } FIBER, *PFIBER;
199 
200 #ifndef NTOS_MODE_USER
201 //
202 // Number of dispatch codes supported by KINTERRUPT
203 //
204 #ifdef _M_AMD64
205 #define DISPATCH_LENGTH 4
206 #elif (NTDDI_VERSION >= NTDDI_LONGHORN)
207 #define DISPATCH_LENGTH 135
208 #else
209 #define DISPATCH_LENGTH 106
210 #endif
211 
212 #else
213 
214 //
215 // KPROCESSOR_MODE Type
216 //
217 typedef CCHAR KPROCESSOR_MODE;
218 
219 //
220 // Dereferencable pointer to KUSER_SHARED_DATA in User-Mode
221 //
222 #define SharedUserData ((KUSER_SHARED_DATA *)USER_SHARED_DATA)
223 
224 #ifdef _X86_
225 /* Macros for user-mode run-time checks of X86 system architecture */
226 
227 #ifndef IsNEC_98
228 #define IsNEC_98 (SharedUserData->AlternativeArchitecture == NEC98x86)
229 #endif
230 
231 #ifndef IsNotNEC_98
232 #define IsNotNEC_98 (SharedUserData->AlternativeArchitecture != NEC98x86)
233 #endif
234 
235 /* User-mode cannot override the architecture */
236 #ifndef SetNEC_98
237 #define SetNEC_98
238 #endif
239 
240 /* User-mode cannot override the architecture */
241 #ifndef SetNotNEC_98
242 #define SetNotNEC_98
243 #endif
244 
245 #else // !_X86_
246 /* Correctly define these run-time definitions for non X86 machines */
247 
248 #ifndef IsNEC_98
249 #define IsNEC_98 (FALSE)
250 #endif
251 
252 #ifndef IsNotNEC_98
253 #define IsNotNEC_98 (TRUE)
254 #endif
255 
256 #ifndef SetNEC_98
257 #define SetNEC_98
258 #endif
259 
260 #ifndef SetNotNEC_98
261 #define SetNotNEC_98
262 #endif
263 
264 #endif // _X86_
265 
266 //
267 // Maximum WOW64 Entries in KUSER_SHARED_DATA
268 //
269 #define MAX_WOW64_SHARED_ENTRIES 16
270 
271 //
272 // Maximum Processor Features supported in KUSER_SHARED_DATA
273 //
274 #define PROCESSOR_FEATURE_MAX 64
275 
276 //
277 // Event Types
278 //
279 typedef enum _EVENT_TYPE
280 {
283 } EVENT_TYPE;
284 
285 //
286 // Timer Types
287 //
288 typedef enum _TIMER_TYPE
289 {
292 } TIMER_TYPE;
293 
294 //
295 // Wait Types
296 //
297 typedef enum _WAIT_TYPE
298 {
299  WaitAll,
300  WaitAny
301 } WAIT_TYPE;
302 
303 //
304 // Processor Execution Modes
305 //
306 typedef enum _MODE
307 {
308  KernelMode,
309  UserMode,
311 } MODE;
312 
313 //
314 // Wait Reasons
315 //
316 typedef enum _KWAIT_REASON
317 {
318  Executive,
319  FreePage,
320  PageIn,
323  Suspended,
324  UserRequest,
325  WrExecutive,
326  WrFreePage,
327  WrPageIn,
330  WrSuspended,
332  WrEventPair,
333  WrQueue,
334  WrLpcReceive,
335  WrLpcReply,
337  WrPageOut,
338  WrRendezvous,
339  Spare2,
341  Spare4,
342  Spare5,
343  Spare6,
344  WrKernel,
345  WrResource,
346  WrPushLock,
347  WrMutex,
348  WrQuantumEnd,
350  WrPreempted,
353 } KWAIT_REASON;
354 
355 //
356 // Profiling Sources
357 //
358 typedef enum _KPROFILE_SOURCE
359 {
360  ProfileTime,
386 
387 //
388 // NT Product and Architecture Types
389 //
390 typedef enum _NT_PRODUCT_TYPE
391 {
392  NtProductWinNt = 1,
396 
398 {
400  NEC98x86,
403 
404 #endif
405 
406 //
407 // Thread States
408 //
409 typedef enum _KTHREAD_STATE
410 {
419 #if (NTDDI_VERSION >= NTDDI_WS03)
421 #endif
423 
424 //
425 // Kernel Object Types
426 //
427 typedef enum _KOBJECTS
428 {
447  ApcObject = 18,
448  DpcObject = 19,
455 } KOBJECTS;
456 
457 //
458 // Adjust reasons
459 //
460 typedef enum _ADJUST_REASON
461 {
465 } ADJUST_REASON;
466 
467 //
468 // Continue Status
469 //
470 typedef enum _KCONTINUE_STATUS
471 {
477 
478 //
479 // Process States
480 //
481 typedef enum _KPROCESS_STATE
482 {
489 
490 //
491 // NtVdmControl Classes
492 //
493 typedef enum _VDMSERVICECLASS
494 {
511 
512 #ifdef NTOS_MODE_USER
513 
514 //
515 // APC Normal Routine
516 //
517 typedef VOID
519  _In_ PVOID NormalContext,
522 );
523 
524 //
525 // Timer Routine
526 //
527 typedef VOID
530  _In_ ULONG TimerLowValue,
531  _In_ LONG TimerHighValue
532 );
533 
534 //
535 // System Time Structure
536 //
537 typedef struct _KSYSTEM_TIME
538 {
539  ULONG LowPart;
540  LONG High1Time;
541  LONG High2Time;
543 
544 //
545 // Shared Kernel User Data
546 //
547 typedef struct _KUSER_SHARED_DATA
548 {
551  volatile KSYSTEM_TIME InterruptTime;
552  volatile KSYSTEM_TIME SystemTime;
553  volatile KSYSTEM_TIME TimeZoneBias;
556  WCHAR NtSystemRoot[260];
561  ULONG Reserved2[7];
569  volatile ULONG TimeSlip;
574 #if (NTDDI_VERSION >= NTDDI_WINXPSP2)
576 #endif
577  volatile ULONG ActiveConsoleId;
578  volatile ULONG DismountCount;
583  ULONG TraceLogging;
584  ULONG Fill0;
589  union {
590  volatile KSYSTEM_TIME TickCount;
591  volatile ULONG64 TickCountQuad;
592  };
593  ULONG Cookie;
594 #if (NTDDI_VERSION >= NTDDI_WS03)
597 #endif
598 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
600  ULONG HeapTracingPid[2];
601  ULONG CritSecTracingPid[2];
602  union
603  {
605  struct
606  {
611  ULONG SpareBits:28;
612  };
613  };
615  KAFFINITY ActiveProcessorAffinity;
616 #endif
618 
619 //
620 // VDM Structures
621 //
622 #include "pshpack1.h"
623 typedef struct _VdmVirtualIca
624 {
625  LONG ica_count[8];
626  LONG ica_int_line;
627  LONG ica_cpu_int;
628  USHORT ica_base;
629  USHORT ica_hipiri;
630  USHORT ica_mode;
631  UCHAR ica_master;
632  UCHAR ica_irr;
633  UCHAR ica_isr;
634  UCHAR ica_imr;
635  UCHAR ica_ssr;
636 } VDMVIRTUALICA, *PVDMVIRTUALICA;
637 #include "poppack.h"
638 
639 typedef struct _VdmIcaUserData
640 {
641  PVOID pIcaLock;
642  PVDMVIRTUALICA pIcaMaster;
643  PVDMVIRTUALICA pIcaSlave;
644  PULONG pDelayIrq;
645  PULONG pUndelayIrq;
646  PULONG pDelayIret;
647  PULONG pIretHooked;
648  PULONG pAddrIretBopTable;
649  PHANDLE phWowIdleEvent;
650  PLARGE_INTEGER pIcaTimeout;
651  PHANDLE phMainThreadSuspended;
652 } VDMICAUSERDATA, *PVDMICAUSERDATA;
653 
654 typedef struct _VDM_INITIALIZE_DATA
655 {
656  PVOID TrapcHandler;
657  PVDMICAUSERDATA IcaUserData;
658 } VDM_INITIALIZE_DATA, *PVDM_INITIALIZE_DATA;
659 
660 #else
661 
662 //
663 // System Thread Start Routine
664 //
665 typedef
666 VOID
669  PVOID StartContext
670 );
671 
672 #ifndef _NTSYSTEM_
673 typedef VOID
675  IN PVOID NormalContext OPTIONAL,
678 
679 typedef VOID
681  IN struct _KAPC *Apc);
682 
683 typedef VOID
685  IN struct _KAPC *Apc,
686  IN OUT PKNORMAL_ROUTINE *NormalRoutine OPTIONAL,
690 #endif
691 
692 //
693 // APC Environment Types
694 //
695 typedef enum _KAPC_ENVIRONMENT
696 {
702 
703 typedef struct _KTIMER_TABLE_ENTRY
704 {
705 #if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM) || defined(_M_AMD64)
707 #endif
711 
712 typedef struct _KTIMER_TABLE
713 {
717 
718 typedef struct _KDPC_LIST
719 {
723 
724 typedef struct _SYNCH_COUNTERS
725 {
773 
774 //
775 // PRCB DPC Data
776 //
777 typedef struct _KDPC_DATA
778 {
779 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
781 #else
782  LIST_ENTRY DpcListHead;
783 #endif
785 #if defined(_M_AMD64) || defined(_M_ARM)
786  volatile LONG DpcQueueDepth;
787 #else
789 #endif
791 #if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM)
793 #endif
795 
796 //
797 // Per-Processor Lookaside List
798 //
799 typedef struct _PP_LOOKASIDE_LIST
800 {
804 
805 //
806 // Architectural Types
807 //
808 #include <arch/ketypes.h>
809 
810 //
811 // Kernel Memory Node
812 //
813 #include <pshpack1.h>
814 typedef struct _KNODE
815 {
822  struct _flags {
824  UCHAR Fill : 7;
825  } Flags;
829 } KNODE, *PKNODE;
830 #include <poppack.h>
831 
832 //
833 // Structure for Get/SetContext APC
834 //
835 typedef struct _GETSETCONTEXT
836 {
842 
843 //
844 // Kernel Profile Object
845 //
846 typedef struct _KPROFILE
847 {
860 } KPROFILE, *PKPROFILE;
861 
862 //
863 // Kernel Interrupt Object
864 //
865 typedef struct _KINTERRUPT
866 {
871 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
874 #endif
888 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
890 #endif
893 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
895 #endif
896 #ifdef _M_AMD64
897  PKTRAP_FRAME TrapFrame;
898  PVOID Reserved;
899 #endif
901 } KINTERRUPT;
902 
903 //
904 // Kernel Event Pair Object
905 //
906 typedef struct _KEVENT_PAIR
907 {
913 
914 //
915 // Kernel No Execute Options
916 //
917 typedef struct _KEXECUTE_OPTIONS
918 {
927 
928 #if (NTDDI_VERSION >= NTDDI_WIN7)
930 {
932  struct
933  {
941  };
943 
944 typedef struct _COUNTER_READING
945 {
951 
952 typedef struct _KTHREAD_COUNTERS
953 {
955  struct _THREAD_PERFORMANCE_DATA* UserData;
962 #endif
963 
965 #if (NTDDI_VERSION >= NTDDI_WIN8)
966 typedef struct _RTL_RB_TREE
967 {
971 #endif
972 
973 #if (NTDDI_VERSION >= NTDDI_WINBLUE)
975 {
976  union
977  {
978  struct
979  {
980 #if (NTDDI_VERSION >= NTDDI_WIN10) // since 6.4.9841.0
982 #else
983  ULONG_PTR Waiting : 1;
984 #endif
986  ULONG_PTR Reserved : (8 * sizeof(PVOID)) - 3; // previously Spare
988  };
990  };
991  union
992  {
994  struct
995  {
997 #ifdef _WIN64
998  ULONG SessionPad;
999 #endif
1000  };
1001  };
1003 
1004 typedef struct _KLOCK_ENTRY
1005 {
1006  union
1007  {
1010  };
1011 #if (NTDDI_VERSION >= NTDDI_WIN10)
1012  union
1013  {
1015  struct
1016  {
1018  union
1019  {
1021  struct
1022  {
1025  };
1026  };
1027  union
1028  {
1031  };
1032  union
1033  {
1035  struct
1036  {
1039  UCHAR IoQoSWaiter : 1; // since TH2
1041  };
1042  };
1043  };
1044  struct
1045  {
1048  };
1049  };
1050 #ifdef _WIN64
1051  ULONG SpareFlags;
1052 #endif
1053 #else
1054  union
1055  {
1056  PVOID ThreadUnsafe;
1057  struct
1058  {
1059  volatile UCHAR HeadNodeByte;
1060  UCHAR Reserved1[2];
1061  volatile UCHAR AcquiredByte;
1062  };
1063  };
1064 #endif
1065 
1066  union
1067  {
1070  struct
1071  {
1072 #if (NTDDI_VERSION >= NTDDI_WIN10)
1074 #else
1075  volatile UCHAR WaitingAndBusyByte;
1076 #endif
1077  UCHAR Reserved[sizeof(PVOID) - 2];
1079  union
1080  {
1082  struct
1083  {
1085 #ifdef _WIN64
1086  ULONG SessionPad;
1087 #endif
1088  };
1089  };
1090  };
1091  };
1092  union
1093  {
1094  struct
1095  {
1098  };
1100  };
1102  union
1103  {
1104 #if _WIN64
1105  ULONG AllBoosts : 17;
1106 #else
1108 #endif
1109  struct
1110  {
1111  struct
1112  {
1115  };
1116  struct
1117  {
1121  };
1122  };
1123  };
1124 #if _WIN64
1125  ULONG SparePad;
1126 #endif
1128 
1129 #endif
1130 
1131 //
1132 // Kernel Thread (KTHREAD)
1133 //
1134 #if (NTDDI_VERSION < NTDDI_WIN8)
1135 
1136 typedef struct _KTHREAD
1137 {
1139 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1141 #ifndef _WIN64 // [
1143 #endif // ]
1145 #else // ][
1147 #endif // ]
1149  ULONG_PTR StackLimit; // FIXME: PVOID
1152 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1154  BOOLEAN Running;
1155  BOOLEAN Alerted[2];
1156  union
1157  {
1158  struct
1159  {
1160  ULONG KernelStackResident:1;
1163  ULONG WaitNext:1;
1165  ULONG Alertable:1;
1166  ULONG GdiFlushActive:1;
1172  ULONG TimerActive:1;
1173  ULONG Reserved:19;
1174  };
1175  LONG MiscFlags;
1176  };
1177 #endif // ]
1178  union
1179  {
1181  struct
1182  {
1183  UCHAR ApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1];
1184 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1185  SCHAR Priority;
1186 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1187  /* On x86, the following members "fall out" of the union */
1188  volatile ULONG NextProcessor;
1189  volatile ULONG DeferredProcessor;
1190 #else // ][
1191  /* On x86, the following members "fall out" of the union */
1192  volatile USHORT NextProcessor;
1193  volatile USHORT DeferredProcessor;
1194 #endif // ]
1195 #else // ][
1197  /* On x86, the following members "fall out" of the union */
1198  volatile UCHAR NextProcessor;
1199  volatile UCHAR DeferredProcessor;
1202 #endif // ]
1203  };
1204  };
1205  KSPIN_LOCK ApcQueueLock;
1206 #ifndef _M_AMD64 // [
1208  volatile UCHAR State;
1209  UCHAR NpxState;
1210  KIRQL WaitIrql;
1212 #endif // ]
1214 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1216 #else // ][
1217  union
1218  {
1221  };
1222 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1223  union
1224  {
1225  struct
1226  {
1227  ULONG KernelStackResident:1;
1230  ULONG WaitNext:1;
1232  ULONG Alertable:1;
1233  ULONG GdiFlushActive:1;
1234  ULONG Reserved:25;
1235  };
1236  LONG MiscFlags;
1237  };
1238 #else // ][
1240  BOOLEAN WaitNext;
1241 #endif // ]
1242  UCHAR WaitReason;
1243 #if (NTDDI_VERSION < NTDDI_LONGHORN)
1244  SCHAR Priority;
1246 #endif // ]
1247  volatile UCHAR SwapBusy;
1249 #endif // ]
1250  union
1251  {
1254  };
1255  PKQUEUE Queue;
1256 #ifndef _M_AMD64 // [
1257  ULONG WaitTime;
1258  union
1259  {
1260  struct
1261  {
1264  };
1266  };
1267 #endif // ]
1268  struct _TEB *Teb;
1269 
1270 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1271  KTIMER Timer;
1272 #else // ][
1273  union
1274  {
1275  KTIMER Timer;
1276  struct
1277  {
1278  UCHAR TimerFill[FIELD_OFFSET(KTIMER, Period) + sizeof(LONG)];
1279 #if !defined(_WIN64) // [
1280  };
1281  };
1282 #endif // ]
1283 #endif // ]
1284  union
1285  {
1286  struct
1287  {
1288  ULONG AutoAlignment:1;
1289  ULONG DisableBoost:1;
1290 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1291  ULONG EtwStackTraceApc1Inserted:1;
1292  ULONG EtwStackTraceApc2Inserted:1;
1293  ULONG CycleChargePending:1;
1294  ULONG CalloutActive:1;
1295  ULONG ApcQueueable:1;
1297  ULONG GuiThread:1;
1298  ULONG ReservedFlags:23;
1299 #else // ][
1300  LONG ReservedFlags:30;
1301 #endif // ]
1302  };
1303  LONG ThreadFlags;
1304  };
1305 #if defined(_WIN64) && (NTDDI_VERSION < NTDDI_WIN7) // [
1306  };
1307  };
1308 #endif // ]
1309 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1310 #if defined(_WIN64) // [
1311  ULONG Spare0;
1312 #else // ][
1314 #endif // ]
1315 #endif // ]
1316  union
1317  {
1319 #if (NTDDI_VERSION < NTDDI_WIN7) // [
1320  struct
1321  {
1322  UCHAR WaitBlockFill0[FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 32bit = 23, 64bit = 43
1323 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1324  UCHAR IdealProcessor;
1325 #else // ][
1326  BOOLEAN SystemAffinityActive;
1327 #endif // ]
1328  };
1329  struct
1330  {
1331  UCHAR WaitBlockFill1[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 47 / 91
1333  };
1334  struct
1335  {
1336  UCHAR WaitBlockFill2[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 71 / 139
1337  UCHAR ResourceIndex;
1338  };
1339  struct
1340  {
1341  UCHAR WaitBlockFill3[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 95 / 187
1342  UCHAR LargeStack;
1343  };
1344 #endif // ]
1345 #ifdef _WIN64 // [
1346  struct
1347  {
1348  UCHAR WaitBlockFill4[FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1349  ULONG ContextSwitches;
1350  };
1351  struct
1352  {
1353  UCHAR WaitBlockFill5[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1354  UCHAR State;
1355  UCHAR NpxState;
1356  UCHAR WaitIrql;
1357  CHAR WaitMode;
1358  };
1359  struct
1360  {
1361  UCHAR WaitBlockFill6[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1362  ULONG WaitTime;
1363  };
1364 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1365  struct
1366  {
1367  UCHAR WaitBlockFill7[168];
1368  PVOID TebMappedLowVa;
1369  struct _UMS_CONTROL_BLOCK* Ucb;
1370  };
1371 #endif // ]
1372  struct
1373  {
1374 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1375  UCHAR WaitBlockFill8[188];
1376 #else // ][
1377  UCHAR WaitBlockFill7[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1378 #endif // ]
1379  union
1380  {
1381  struct
1382  {
1383  SHORT KernelApcDisable;
1384  SHORT SpecialApcDisable;
1385  };
1386  ULONG CombinedApcDisable;
1387  };
1388  };
1389 #endif // ]
1390  };
1391  LIST_ENTRY QueueListEntry;
1392  PKTRAP_FRAME TrapFrame;
1393 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1394  PVOID FirstArgument;
1395  union
1396  {
1397  PVOID CallbackStack;
1398  ULONG_PTR CallbackDepth;
1399  };
1400 #else // ][
1401  PVOID CallbackStack;
1402 #endif // ]
1403 #if (NTDDI_VERSION < NTDDI_LONGHORN) || ((NTDDI_VERSION < NTDDI_WIN7) && !defined(_WIN64)) // [
1405 #endif // ]
1406 #if (NTDDI_VERSION < NTDDI_LONGHORN) && defined(_WIN64) // [
1407  ULONG KernelLimit;
1408 #endif // ]
1409  UCHAR ApcStateIndex;
1410 #if (NTDDI_VERSION < NTDDI_LONGHORN) // [
1411  UCHAR IdealProcessor;
1412  BOOLEAN Preempted;
1413  BOOLEAN ProcessReadyQueue;
1414 #ifdef _WIN64 // [
1415  PVOID Win32kTable;
1416  ULONG Win32kLimit;
1417 #endif // ]
1418  BOOLEAN KernelStackResident;
1419 #endif // ]
1420  SCHAR BasePriority;
1421  SCHAR PriorityDecrement;
1422 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1423  BOOLEAN Preempted;
1424  UCHAR AdjustReason;
1425  CHAR AdjustIncrement;
1426 #if (NTDDI_VERSION >= NTDDI_WIN7)
1428 #else
1429  UCHAR Spare01;
1430 #endif
1431 #endif // ]
1432  CHAR Saturation;
1433 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1434  ULONG SystemCallNumber;
1435 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1436  ULONG FreezeCount;
1437 #else // ][
1438  ULONG Spare02;
1439 #endif // ]
1440 #endif // ]
1441 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1442  GROUP_AFFINITY UserAffinity;
1443  struct _KPROCESS *Process;
1445  ULONG IdealProcessor;
1446  ULONG UserIdealProcessor;
1447 #else // ][
1448  KAFFINITY UserAffinity;
1449  struct _KPROCESS *Process;
1451 #endif // ]
1452  PKAPC_STATE ApcStatePointer[2];
1453  union
1454  {
1455  KAPC_STATE SavedApcState;
1456  struct
1457  {
1458  UCHAR SavedApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1];
1459 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1460  UCHAR WaitReason;
1461 #else // ][
1462  CCHAR FreezeCount;
1463 #endif // ]
1464 #ifndef _WIN64 // [
1465  };
1466  };
1467 #endif // ]
1468  CCHAR SuspendCount;
1469 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1470  CCHAR Spare1;
1471 #else // ][
1472  UCHAR UserIdealProcessor;
1473 #endif // ]
1474 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1475 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1476  UCHAR Spare03;
1477 #else // ][
1478  UCHAR CalloutActive;
1479 #endif // ]
1480 #ifdef _WIN64 // [
1481  UCHAR CodePatchInProgress;
1482  };
1483  };
1484 #endif // ]
1485 #if defined(_M_IX86) // [
1486 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1487  UCHAR OtherPlatformFill;
1488 #else // ][
1489  UCHAR Iopl;
1490 #endif // ]
1491 #endif // ]
1492  PVOID Win32Thread;
1493  PVOID StackBase;
1494  union
1495  {
1496  KAPC SuspendApc;
1497  struct
1498  {
1499  UCHAR SuspendApcFill0[1];
1500 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1501  UCHAR ResourceIndex;
1502 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1503  CHAR Spare04;
1504 #else // ][
1505  SCHAR Quantum;
1506 #endif // ]
1507  };
1508  struct
1509  {
1510  UCHAR SuspendApcFill1[3];
1512  };
1513  struct
1514  {
1515  UCHAR SuspendApcFill2[4];
1516  ULONG KernelTime;
1517  };
1518  struct
1519  {
1520  UCHAR SuspendApcFill3[FIELD_OFFSET(KAPC, SystemArgument1)];
1521 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
1522  PKPRCB WaitPrcb;
1523 #else
1524  PVOID TlsArray;
1525 #endif
1526  };
1527  struct
1528  {
1529  UCHAR SuspendApcFill4[FIELD_OFFSET(KAPC, SystemArgument2)]; // 40 / 72
1530  PVOID LegoData;
1531  };
1532  struct
1533  {
1534  UCHAR SuspendApcFill5[FIELD_OFFSET(KAPC, Inserted) + 1]; // 47 / 83
1535 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1536  UCHAR LargeStack;
1537 #else // ][
1538  UCHAR PowerState;
1539 #endif // ]
1540 #ifdef _WIN64 // [
1541  ULONG UserTime;
1542 #endif // ]
1543  };
1544  };
1545 #ifndef _WIN64 // [
1546  ULONG UserTime;
1547 #endif // ]
1548  union
1549  {
1550  KSEMAPHORE SuspendSemaphore;
1551  struct
1552  {
1553  UCHAR SuspendSemaphorefill[FIELD_OFFSET(KSEMAPHORE, Limit) + 4]; // 20 / 28
1554 #ifdef _WIN64 // [
1555  ULONG SListFaultCount;
1556 #endif // ]
1557  };
1558  };
1559 #ifndef _WIN64 // [
1560  ULONG SListFaultCount;
1561 #endif // ]
1562  LIST_ENTRY ThreadListEntry;
1563 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1564  LIST_ENTRY MutantListHead;
1565 #endif // ]
1566  PVOID SListFaultAddress;
1567 #ifdef _M_AMD64 // [
1568  LONG64 ReadOperationCount;
1569  LONG64 WriteOperationCount;
1570  LONG64 OtherOperationCount;
1571  LONG64 ReadTransferCount;
1572  LONG64 WriteTransferCount;
1573  LONG64 OtherTransferCount;
1574 #endif // ]
1575 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1576  PKTHREAD_COUNTERS ThreadCounters;
1577  PXSTATE_SAVE XStateSave;
1578 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1579  PVOID MdlForLockedTeb;
1580 #endif // ]
1581 } KTHREAD;
1582 
1583 #else // not (NTDDI_VERSION < NTDDI_WIN8)
1584 
1585 #if defined(_WIN64) && (NTDDI_VERSION < 0x06032580) // since WIN 8.1 Update1 6.3.9600.16384
1586 #define NUMBER_OF_LOCK_ENTRIES 5
1587 #else
1588 #define NUMBER_OF_LOCK_ENTRIES 6
1589 #endif
1590 
1591 typedef struct _KTHREAD
1592 {
1597  volatile VOID *StackLimit;
1600  volatile ULONG64 CycleTime;
1601 #ifndef _WIN64
1604 #endif
1609  struct _KSCHEDULING_GROUP* SchedulingGroup;
1613 
1614  union
1615  {
1616  struct
1617  {
1618 #if (NTDDI_VERSION < NTDDI_WIN10)
1619  ULONG KernelStackResident : 1;
1620 #else
1622 #endif
1624 #if (NTDDI_VERSION < NTDDI_WIN10TH2)
1626 #endif
1631 #if (NTDDI_VERSION < NTDDI_WIN81)
1632  ULONG CodePatchInProgress : 1;
1633 #endif
1648  };
1650  };
1651 
1652  union
1653  {
1654  struct
1655  {
1670 #if (NTDDI_VERSION >= 0x060324D7) // since 6.3.9431.0
1671  ULONG TerminationApcRequest : 1;
1672 #endif
1673 #if (NTDDI_VERSION >= 0x06032580) // since 6.3.9600.16384
1674  ULONG AutoBoostEntriesExhausted : 1;
1675 #endif
1676 #if (NTDDI_VERSION >= 0x06032580) // since 6.3.9600.17031
1677  ULONG KernelStackResident : 1;
1678 #endif
1679 #if (NTDDI_VERSION >= NTDDI_WIN10)
1683 #endif
1685 #if (NTDDI_VERSION < NTDDI_WIN10)
1686  ULONG ReservedFlags : 10;
1687 #endif
1688  };
1690  };
1691 
1692 #if (NTDDI_VERSION >= NTDDI_WIN10)
1693  volatile UCHAR Tag;
1698 #else
1699  ULONG Spare0;
1700 #endif
1702 #ifdef _WIN64
1703  ULONG Spare1; // Win 10: Spare10
1704 #endif
1707 
1708  union
1709  {
1711  struct
1712  {
1713  UCHAR ApcStateFill[RTL_SIZEOF_THROUGH_FIELD(KAPC_STATE, UserApcPending)]; // 32bit: 23/0x17, 64bit: 43/0x2B
1716  };
1717  };
1718 
1719 #ifndef _WIN64
1721  volatile UCHAR State;
1722 #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10074.0
1724 #else
1725  CHAR NpxState;
1726 #endif
1729 #endif
1730 
1733  union
1734  {
1737  };
1740 #if (NTDDI_VERSION >= NTDDI_WIN8 /* 0x060223F0 */) // since 6.2.9200.16384
1742 #endif
1744 
1745  union
1746  {
1748 #ifdef _WIN64
1749  struct
1750  {
1751  UCHAR WaitBlockFill4[FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 20/0x14
1753  };
1754  struct
1755  {
1756  UCHAR WaitBlockFill5[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 68/0x44
1757  UCHAR State;
1758 #if (NTDDI_VERSION >= NTDDI_WIN10)
1759  CHAR Spare13;
1760 #else
1761  CHAR NpxState;
1762 #endif
1763  UCHAR WaitIrql;
1764  CHAR WaitMode;
1765  };
1766  struct
1767  {
1768  UCHAR WaitBlockFill6[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 116/0x74
1769  ULONG WaitTime;
1770  };
1771  struct
1772  {
1773  UCHAR WaitBlockFill7[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)]; // 32bit: -, 64bit: 164/0xA4
1774  union
1775  {
1776  struct
1777  {
1780  };
1782  };
1783  };
1784 #endif
1785  struct
1786  {
1787  UCHAR WaitBlockFill8[FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 20/0x14, 64bit: 40/0x28
1789  };
1790  struct
1791  {
1792  UCHAR WaitBlockFill9[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 44/0x2C, 64bit: 88/0x58
1794  };
1795  struct
1796  {
1797  UCHAR WaitBlockFill10[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]; // 32bit: 68/0x44, 64bit: 136/0x88
1799  };
1800  struct
1801  {
1802  UCHAR WaitBlockFill11[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, Object)]; // 32bit: 88/0x58, 64bit: 176/0xB0
1803 #ifdef _WIN64
1804  struct _UMS_CONTROL_BLOCK* Ucb;
1805  struct _KUMS_CONTEXT_HEADER* Uch;
1806 #else
1808  union
1809  {
1810  struct
1811  {
1814  };
1816  };
1817 #endif
1818  };
1819  };
1820 
1821 #ifdef _WIN64
1822  PVOID TebMappedLowVa;
1823 #endif
1825 #if (NTDDI_VERSION >= 0x060223F0) // since 6.2.9200.16384
1826  union
1827  {
1829  struct
1830  {
1831  ULONG NextProcessorNumber : 31;
1832  ULONG SharedReadyQueue : 1;
1833  };
1834  };
1835  LONG QueuePriority;
1836 #else
1839 #endif
1841 
1842  union
1843  {
1845  struct
1846  {
1847  UCHAR UserAffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]; // 32bit: 6/0x6, 64bit: 10/0x0A
1850  union
1851  {
1853  struct
1854  {
1857  };
1858  };
1862  };
1863  };
1864 
1865 #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384
1867 #endif
1868  union
1869  {
1871  struct
1872  {
1873  UCHAR AffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]; // 32bit: 6/0x6, 64bit: 10/0x0A
1877  };
1878  };
1879 
1880 #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384
1881 #ifdef _WIN64
1882  ULONG64 NpxState;
1883 #else
1885 #endif
1886 #else
1887  PKAPC_STATE ApcStatePointer[2];
1888 #endif
1889 
1890  union
1891  {
1893  struct
1894  {
1895  UCHAR SavedApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1]; // 32bit: 23/0x17, 64bit: 43/0x2B
1900  };
1901  };
1902 
1903  union
1904  {
1906  struct
1907  {
1908  UCHAR SchedulerApcFill0[FIELD_OFFSET(KAPC, SpareByte0)]; // 32bit: 1/0x01, 64bit: 1/0x01
1910  };
1911  struct
1912  {
1913  UCHAR SchedulerApcFill1[FIELD_OFFSET(KAPC, SpareByte1)]; // 32bit: 3/0x03, 64bit: 3/0x03
1915  };
1916  struct
1917  {
1918  UCHAR SchedulerApcFill2[FIELD_OFFSET(KAPC, SpareLong0)]; // 32bit: 4/0x04, 64bit: 4/0x04
1920  };
1921  struct
1922  {
1923  UCHAR SuspendApcFill3[FIELD_OFFSET(KAPC, SystemArgument1)]; // 32 bit:, 64 bit: 64/0x40
1925  };
1926  struct
1927  {
1928  UCHAR SchedulerApcFill4[FIELD_OFFSET(KAPC, SystemArgument2)]; // 32 bit:, 64 bit: 72/0x48
1930  };
1931  struct
1932  {
1933  UCHAR SchedulerApcFill5[FIELD_OFFSET(KAPC, Inserted) + 1]; // 32 bit:, 64 bit: 83/0x53
1936  };
1937  };
1938 
1942 
1943 #if (NTDDI_VERSION >= NTDDI_WIN10)
1947 #if _WIN64
1948  ULONG SecureThreadCookie;
1949 #endif
1950 #elif (NTDDI_VERSION >= NTDDI_WINBLUE) // 6.3.9431.0
1951  SINGLE_LIST_ENTRY LockEntriesFreeList;
1952 #endif
1953 
1954 #if (NTDDI_VERSION >= NTDDI_WINBLUE /* 0x06032580 */) // since 6.3.9600.16384
1961  #if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
1963  #endif
1964 
1965  #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10240.16384
1967  #else
1968  volatile SHORT AbReferenceCount;
1969  #endif
1970  #if (NTDDI_VERSION >= 0x06040000) // since 6.4.9841.0
1971  UCHAR AbOrphanedEntrySummary;
1972  UCHAR AbOwnedEntryCount;
1973  #else
1976  #endif
1978  union
1979  {
1981  struct
1982  {
1985  };
1986  };
1987 #endif
1988 
1989 #if _WIN64
1990  LONG64 ReadOperationCount;
1991  LONG64 WriteOperationCount;
1992  LONG64 OtherOperationCount;
1993  LONG64 ReadTransferCount;
1994  LONG64 WriteTransferCount;
1995  LONG64 OtherTransferCount;
1996 #endif
1997 #if (NTDDI_VERSION >= NTDDI_WIN10) // since 10.0.10041.0
1998  struct _KSCB *QueuedScb;
1999 #ifndef _WIN64
2001 #endif
2002 #endif
2003 } KTHREAD;
2004 
2005 #endif
2006 
2007 
2008 #define ASSERT_THREAD(object) \
2009  ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == ThreadObject))
2010 
2011 //
2012 // Kernel Process (KPROCESS)
2013 //
2014 typedef struct _KPROCESS
2015 {
2018 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
2021 #else
2023 #endif
2024 #if defined(_M_IX86)
2025  KGDTENTRY LdtDescriptor;
2026  KIDTENTRY Int21Descriptor;
2027 #endif
2029 #if defined(_M_IX86)
2030  UCHAR Iopl;
2031  UCHAR Unused;
2032 #endif
2042  union
2043  {
2044  struct
2045  {
2050  };
2052  };
2060  union
2061  {
2064  };
2067 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
2069 #endif // ]
2070 } KPROCESS;
2071 
2072 #define ASSERT_PROCESS(object) \
2073  ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == ProcessObject))
2074 
2075 //
2076 // System Service Table Descriptor
2077 //
2079 {
2083 #if defined(_IA64_)
2084  LONG TableBaseGpOffset;
2085 #endif
2088 
2089 #if (NTDDI_VERSION >= NTDDI_WIN8)
2090 //
2091 // Entropy Timing State
2092 //
2094 {
2101 
2102 //
2103 // Constants from ks386.inc, ksamd64.inc and ksarm.h
2104 //
2105 #define KENTROPY_TIMING_INTERRUPTS_PER_BUFFER 0x400
2106 #define KENTROPY_TIMING_BUFFER_MASK 0x7ff
2107 #define KENTROPY_TIMING_ANALYSIS 0x0
2108 
2109 #endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
2110 
2111 //
2112 // Exported Loader Parameter Block
2113 //
2115 
2116 //
2117 // Exported Hardware Data
2118 //
2126 
2127 //
2128 // Exported System Service Descriptor Tables
2129 //
2132 
2133 #endif // !NTOS_MODE_USER
2134 
2135 #endif // _KETYPES_H
ULONG LargePageMinimum
Definition: ketypes.h:1162
BOOLEAN Started
Definition: ketypes.h:859
ULONG ServiceCount
Definition: ketypes.h:891
_KWAIT_REASON
Definition: ketypes.h:402
CSHORT Type
Definition: ketypes.h:848
UCHAR SuspendApcFill3[FIELD_OFFSET(KAPC, SystemArgument1)]
Definition: ketypes.h:1923
PVOID StackBase
Definition: ketypes.h:183
SCHAR QuantumReset
Definition: ketypes.h:2054
LONG ThreadFlags
Definition: ketypes.h:1689
ULONG LowPart
Definition: ketypes.h:917
CONTEXT FiberContext
Definition: ketypes.h:186
struct _KTIMER_TABLE KTIMER_TABLE
LONG AbCompletedIoQoSBoostCount
Definition: ketypes.h:1962
ULONG NtMinorVersion
Definition: ketypes.h:1167
PVOID Buffer
Definition: ketypes.h:855
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1166
ULONG ExAcqResSharedWaitForExclusiveAttempts
Definition: ketypes.h:757
ULONG FreezeCount
Definition: ketypes.h:1669
#define IN
Definition: typedefs.h:39
ULONG_PTR Unused0
Definition: ketypes.h:2020
ULONG SharedDataFlags
Definition: ketypes.h:1199
_VDMSERVICECLASS
Definition: ketypes.h:493
ULONG AutoBoostActive
Definition: ketypes.h:1621
UCHAR Spare1
Definition: ketypes.h:1040
enum _KPROCESS_STATE * PKPROCESS_STATE
BOOLEAN Connected
Definition: ketypes.h:884
KAFFINITY Affinity
Definition: ketypes.h:857
KSPIN_LOCK Lock
Definition: ketypes.h:706
USHORT UserModeGlobalLogger[16]
Definition: ketypes.h:1235
ULONG EtwStackTraceApcInserted
Definition: ketypes.h:1684
USHORT AllBoosts
Definition: ketypes.h:1107
ULONG UserIdealProcessor
Definition: ketypes.h:1715
KAPC_STATE
Definition: ketypes.h:1280
ULONG TimerActive
Definition: ketypes.h:1638
struct _KENTROPY_TIMING_STATE KENTROPY_TIMING_STATE
LONG DisableBoost
Definition: ketypes.h:2047
USHORT Spare20
Definition: ketypes.h:1946
_KPROCESS_STATE
Definition: ketypes.h:481
ULONG ExTryToAcqExclusiveAttempts
Definition: ketypes.h:766
UCHAR AbWaitEntryCount
Definition: ketypes.h:1945
PVOID RangeBase
Definition: ketypes.h:852
struct _KDPC_DATA KDPC_DATA
RTL_RB_TREE WaiterTree
Definition: ketypes.h:1097
KSPIN_LOCK SpinLock
Definition: ketypes.h:876
ULONG Reserved2[7]
Definition: ketypes.h:1163
CONTEXT Context
Definition: ketypes.h:840
enum _KAPC_ENVIRONMENT KAPC_ENVIRONMENT
ULONG EnableStackSwap
Definition: ketypes.h:1661
_ALTERNATIVE_ARCHITECTURE_TYPE
Definition: ketypes.h:889
ULONG AlertedByThreadId
Definition: ketypes.h:1659
volatile LONG AbCompletedIoBoostCount
Definition: ketypes.h:1960
KTIMER_TABLE_ENTRY TimerEntries[256]
Definition: ketypes.h:715
ULONG_PTR DirectoryTableBase
Definition: ketypes.h:2019
enum _KOBJECTS KOBJECTS
UCHAR State
Definition: ketypes.h:2055
SHORT SpecialApcDisable
Definition: ketypes.h:1813
USHORT IoNormalPriorityWaiterCount
Definition: ketypes.h:1119
UCHAR AcquiredBit
Definition: ketypes.h:1030
Definition: ntbasedef.h:628
ULONG ForegroundLossTime
Definition: ketypes.h:1977
ULONG CombinedApcDisable
Definition: ketypes.h:1815
struct _EXCEPTION_REGISTRATION_RECORD * ExceptionList
Definition: ketypes.h:182
_In_ ULONG _In_opt_ POBJECT_ATTRIBUTES _In_opt_ HANDLE _Out_opt_ PCLIENT_ID _In_ PKSTART_ROUTINE StartRoutine
Definition: psfuncs.h:87
ULONG EntryFlags
Definition: ketypes.h:1014
SINGLE_LIST_ENTRY * LastEntry
Definition: ketypes.h:721
ULONG ExSetResOwnerPointerExclusive
Definition: ketypes.h:763
LARGE_INTEGER SystemExpirationDate
Definition: ketypes.h:1174
ULONG UserStackWalkActive
Definition: ketypes.h:1634
SCHAR BasePriority
Definition: ketypes.h:2053
KAPC_STATE SavedApcState
Definition: ketypes.h:1892
LONG ProcessFlags
Definition: ketypes.h:2051
ULONG ExSetResOwnerPointerSharedOld
Definition: ketypes.h:765
ULONG ExAcqResExclusiveAttempts
Definition: ketypes.h:740
PVOID ServiceTable
Definition: ketypes.h:1603
UCHAR UnusualBoost
Definition: ketypes.h:1856
PVOID StackLimit
Definition: ketypes.h:184
_KOBJECTS
Definition: ketypes.h:427
UCHAR SchedulerApcFill2[FIELD_OFFSET(KAPC, SpareLong0)]
Definition: ketypes.h:1918
struct _KTHREAD_COUNTERS * ThreadCounters
Definition: ketypes.h:1788
UCHAR SchedulerApcFill5[FIELD_OFFSET(KAPC, Inserted)+1]
Definition: ketypes.h:1933
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
CSHORT Size
Definition: ketypes.h:909
ULONG ProcessDetachActive
Definition: ketypes.h:1640
PKSERVICE_ROUTINE MessageServiceRoutine
Definition: ketypes.h:872
USHORT IopmOffset
Definition: ketypes.h:2028
PVOID SListFaultAddress
Definition: ketypes.h:1594
Definition: ketypes.h:974
struct _KTIMER_TABLE_ENTRY * PKTIMER_TABLE_ENTRY
LONGLONG ConsoleSessionForegroundProcessId
Definition: ketypes.h:1230
ULONG Spare15
Definition: ketypes.h:1884
ULONG CommitFailTerminateRequest
Definition: ketypes.h:1680
union _KWAIT_STATUS_REGISTER KWAIT_STATUS_REGISTER
ULONGLONG TestRetInstruction
Definition: ketypes.h:1215
SCHAR Priority
Definition: ketypes.h:1714
ULONG MaxStackTraceDepth
Definition: ketypes.h:1159
UCHAR AcquiredByte
Definition: ketypes.h:1029
_In_ ULONG _In_ ULONG State
Definition: potypes.h:516
enum _KCONTINUE_STATUS KCONTINUE_STATUS
struct _KUSER_SHARED_DATA * PKUSER_SHARED_DATA
ULONG UmsPerformingSyscall
Definition: ketypes.h:1645
ULONG64 Total
Definition: ketypes.h:949
UCHAR Removable
Definition: ketypes.h:823
struct _KDPC_LIST KDPC_LIST
ULONG CryptoExponent
Definition: ketypes.h:1160
CHAR Saturation
Definition: ketypes.h:1898
BOOLEAN Alerted[MaximumMode]
Definition: ketypes.h:1612
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1324
PKTRAP_FRAME TrapFrame
Definition: ketypes.h:1706
ULONG QuantumDonation
Definition: ketypes.h:1660
ULONG_PTR InTree
Definition: ketypes.h:987
ULONG SystemThread
Definition: ketypes.h:1639
struct _KEXECUTE_OPTIONS KEXECUTE_OPTIONS
ULONG ExEtwSynchTrackingNotificationsCount
Definition: ketypes.h:770
ULONG IpiSendRequestBroadcastCount
Definition: ketypes.h:729
ULONG ExAcqResSharedAttempts
Definition: ketypes.h:745
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
volatile ULONG TimeSlip
Definition: ketypes.h:1171
PKWAIT_BLOCK WaitBlockList
Definition: ketypes.h:1732
ULONG Reserved
Definition: ketypes.h:1647
CSHORT Type
Definition: ketypes.h:867
USHORT IoQoSBoost
Definition: ketypes.h:1118
ULONG UserAffinitySet
Definition: ketypes.h:1658
ULONG DeferPreemption
Definition: ketypes.h:1665
Definition: ketypes.h:1004
int32_t INT_PTR
Definition: typedefs.h:64
_HARDWARE_COUNTER_TYPE
Definition: pstypes.h:123
#define SSDT_MAX_ENTRIES
Definition: ketypes.h:100
PKPROCESS Process
Definition: ketypes.h:1840
#define NUMBER_OF_LOCK_ENTRIES
Definition: ketypes.h:1588
struct _KEVENT_PAIR * PKEVENT_PAIR
ULONG ProcessReadyQueue
Definition: ketypes.h:1627
ULONG_PTR Busy
Definition: ketypes.h:985
struct _KEVENT_PAIR KEVENT_PAIR
ULONG NTSYSAPI KiDmaIoCoherency
Definition: cpu.c:33
struct _SINGLE_LIST_ENTRY * PfnDeferredList
Definition: ketypes.h:828
KLOCK_ENTRY_LOCK_STATE LockState
Definition: ketypes.h:1068
ULONG NTSYSAPI KeIcacheFlushCount
Definition: cpu.c:19
volatile KSYSTEM_TIME InterruptTime
Definition: ketypes.h:1153
#define NTSYSAPI
Definition: ntoskrnl.h:14
ULONG ExAcqResExclusiveAcquiresExclusiveRecursive
Definition: ketypes.h:742
BOOLEAN FloatingSave
Definition: ketypes.h:883
UCHAR ExecuteDisable
Definition: ketypes.h:919
ULONG ExAcqResSharedStarveExclusiveAttempts
Definition: ketypes.h:751
ULONG ExAcqResSharedStarveExclusiveWaits
Definition: ketypes.h:755
struct _SYNCH_COUNTERS SYNCH_COUNTERS
ULONG SystemCallReturn
Definition: ketypes.h:1217
FIXME: should move to rtltypes.h, but we can't include it here.
Definition: ketypes.h:966
SINGLE_LIST_ENTRY FreeListEntry
Definition: ketypes.h:1009
ULONG64 HardwareCounters
Definition: ketypes.h:959
ULONG_PTR DpcLock
Definition: ketypes.h:784
ULONG ExAcqResSharedWaits
Definition: ketypes.h:749
ULONG UmsDirectedSwitchEnable
Definition: ketypes.h:1637
_KPROFILE_SOURCE
Definition: winternl.h:2122
ULONG ExAcqResSharedStarveExclusiveAcquiresExclusive
Definition: ketypes.h:752
PKTIMER TimerExpiry[64]
Definition: ketypes.h:714
struct _KDPC_DATA * PKDPC_DATA
KINTERRUPT_MODE Mode
Definition: ketypes.h:887
enum _KPROCESS_STATE KPROCESS_STATE
volatile ULONG HighCycleTime
Definition: ketypes.h:1602
KSERVICE_ROUTINE * PKSERVICE_ROUTINE
Definition: ketypes.h:500
ULONG ExplicitIdealProcessor
Definition: ketypes.h:1668
ULONG ExAcqResSharedAcquiresExclusive
Definition: ketypes.h:746
Definition: ketypes.h:703
_TIMER_TYPE
PKPRCB WaitPrcb
Definition: ketypes.h:1924
uint32_t ULONG_PTR
Definition: typedefs.h:65
PVOID LockState
Definition: ketypes.h:989
ULONG NextProcessor
Definition: ketypes.h:1837
BOOLEAN SafeBootMode
Definition: ketypes.h:1185
LONG ReservedFlags
Definition: ketypes.h:2049
SLIST_HEADER DeadStackList
Definition: ketypes.h:816
ULONG AutoAlignment
Definition: ketypes.h:1656
PVOID FiberData
Definition: ketypes.h:181
BOOLEAN NTSYSAPI KiEnableTimerWatchdog
Definition: timerobj.c:20
UCHAR IoQoSWaiter
Definition: ketypes.h:1039
struct _RTL_RB_TREE * PRTL_RB_TREE
struct _COUNTER_READING * PCOUNTER_READING
UCHAR KIRQL
Definition: env_spec_w32.h:591
struct _KPROCESS * Process
Definition: ketypes.h:851
ULONG ExecutiveResourceReleaseSharedCount
Definition: ketypes.h:738
UCHAR PriorityFloorCounts[16]
Definition: ketypes.h:1958
ULONG AllFlags
Definition: ketypes.h:1047
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
ULONG ExBoostSharedOwners
Definition: ketypes.h:769
RTL_BALANCED_NODE TreeNode
Definition: ketypes.h:1008
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
Definition: ketypes.h:667
struct _GETSETCONTEXT GETSETCONTEXT
PXSTATE_SAVE XStateSave
Definition: ketypes.h:1793
SINGLE_LIST_ENTRY ForegroundDpcStackListEntry
Definition: ketypes.h:1983
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
LONG MiscFlags
Definition: ketypes.h:1649
ULONG NtMajorVersion
Definition: ketypes.h:1166
SHORT KernelApcDisable
Definition: ketypes.h:1812
KPROFILE_SOURCE Source
Definition: ketypes.h:858
UCHAR CallbackNestingLevel
Definition: ketypes.h:1934
ULONG ImageFileExecutionOptions
Definition: ketypes.h:1241
ULONG TickCount
Definition: ketypes.h:877
KSTART_ROUTINE * PKSTART_ROUTINE
Definition: ketypes.h:487
volatile KSYSTEM_TIME SystemTime
Definition: ketypes.h:1154
ULONG ExAcqResSharedWaitForExclusiveAcquiresShared
Definition: ketypes.h:759
PRTL_BALANCED_NODE Min
Definition: ketypes.h:969
ULONG ExAcqResSharedStarveExclusiveAcquiresShared
Definition: ketypes.h:753
ULONG ExAcqResSharedStarveExclusiveNotAcquires
Definition: ketypes.h:756
ULONG ExAcqResSharedNotAcquires
Definition: ketypes.h:750
long LONG
Definition: pedump.c:60
ULONG ExSetResOwnerPointerSharedNew
Definition: ketypes.h:764
UCHAR ExecuteOptions
Definition: ketypes.h:2063
NT_PRODUCT_TYPE NtProductType
Definition: ketypes.h:1164
KDPC_LIST DpcList
Definition: ketypes.h:780
UCHAR SystemHeteroCpuPolicy
Definition: ketypes.h:1694
KAPC_STATE ApcState
Definition: ketypes.h:1710
short SHORT
Definition: pedump.c:59
UCHAR EntryOffset
Definition: ketypes.h:1017
ULONG SystemAffinityActive
Definition: ketypes.h:1629
struct _KTHREAD_COUNTERS * PKTHREAD_COUNTERS
PVOID FirstArgument
Definition: ketypes.h:1705
ULONG SessionId
Definition: ketypes.h:1084
BOOLEAN KdDebuggerEnabled
Definition: ketypes.h:1176
ULONG_PTR EntryLock
Definition: ketypes.h:1101
KEVENT Event
Definition: ketypes.h:838
ULONG WaitNext
Definition: ketypes.h:1628
ULONG ExAcqResSharedAcquiresShared
Definition: ketypes.h:747
ULONG TickCountMultiplier
Definition: ketypes.h:1152
ULONG ExAcqResSharedWaitForExclusiveAcquiresSharedRecursive
Definition: ketypes.h:760
ULONG64 CycleTimeBias
Definition: ketypes.h:958
UCHAR ImageDispatchEnable
Definition: ketypes.h:924
volatile UCHAR CrossThreadReleasableAndBusyByte
Definition: ketypes.h:1073
UCHAR UserHeteroCpuPolicy
Definition: ketypes.h:1695
ULONG ApcInterruptRequest
Definition: ketypes.h:1635
unsigned char BOOLEAN
LIST_ENTRY ProfileListEntry
Definition: ketypes.h:850
ULONG64 WaitReasonBitMap
Definition: ketypes.h:954
ULONG StackCount
Definition: ketypes.h:2065
enum _KPROFILE_SOURCE KPROFILE_SOURCE
PVOID RangeLimit
Definition: ketypes.h:853
enum _KINTERRUPT_MODE KINTERRUPT_MODE
ULONG TickCountLowDeprecated
Definition: ketypes.h:1151
SINGLE_LIST_ENTRY ListHead
Definition: ketypes.h:720
USHORT IoQoSWaiterCount
Definition: ketypes.h:1120
enum _VDMSERVICECLASS VDMSERVICECLASS
struct _KLOCK_ENTRY_LOCK_STATE * PKLOCK_ENTRY_LOCK_STATE
USHORT IoBoost
Definition: ketypes.h:1114
LIST_ENTRY QueueListEntry
Definition: ketypes.h:1824
LIST_ENTRY ProcessListEntry
Definition: ketypes.h:2066
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
VOID(NTAPI * PKKERNEL_ROUTINE)(IN struct _KAPC *Apc, IN OUT PKNORMAL_ROUTINE *NormalRoutine OPTIONAL, IN OUT PVOID *NormalContext OPTIONAL, IN OUT PVOID *SystemArgument1 OPTIONAL, IN OUT PVOID *SystemArgument2 OPTIONAL)
Definition: ketypes.h:684
Definition: bufpool.h:45
UCHAR WaitBlockFill10[2 *sizeof(KWAIT_BLOCK)+FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]
Definition: ketypes.h:1797
PVOID KernelStack
Definition: ketypes.h:1607
USHORT ImageNumberHigh
Definition: ketypes.h:1157
PVOID DeallocationStack
Definition: ketypes.h:185
struct DECLSPEC_ALIGN(16) _M128A
Definition: ketypes.h:922
KPROCESSOR_MODE Mode
Definition: ketypes.h:839
void * PVOID
Definition: retypes.h:9
PVOID FlsData
Definition: ketypes.h:190
CHAR CpuPriorityKey
Definition: ketypes.h:1099
KTIMER Timer
Definition: ketypes.h:1743
ULONG DispatchCount
Definition: ketypes.h:892
LIST_ENTRY ThreadListHead
Definition: ketypes.h:2039
enum _KTHREAD_STATE KTHREAD_STATE
ULONG_PTR Reserved
Definition: ketypes.h:986
ULONG ScbReadyQueue
Definition: ketypes.h:1642
UCHAR DisableThunkEmulation
Definition: ketypes.h:921
LONG DisableQuantum
Definition: ketypes.h:2048
struct _KSYSTEM_TIME KSYSTEM_TIME
ULONG DpcCount
Definition: ketypes.h:790
CCHAR Number
Definition: ketypes.h:885
struct _LOADER_PARAMETER_BLOCK NTSYSAPI * KeLoaderBlock
Definition: krnlinit.c:29
#define MAX_WOW64_SHARED_ENTRIES
Definition: ketypes.h:1148
struct _KSYSTEM_TIME * PKSYSTEM_TIME
UCHAR WaitReason
Definition: ketypes.h:1896
CHAR BasePriority
Definition: ketypes.h:1849
ULARGE_INTEGER Time
Definition: ketypes.h:709
ULONG SessionId
Definition: ketypes.h:996
ULONG ExecutiveResourceAcquiresCount
Definition: ketypes.h:735
enum _EVENT_TYPE EVENT_TYPE
ULONG ExDeleteResourceCount
Definition: ketypes.h:734
USHORT ImageNumberLow
Definition: ketypes.h:1156
union _KWAIT_STATUS_REGISTER * PKWAIT_STATUS_REGISTER
_Out_ PULONG UserTime
Definition: kefuncs.h:771
UCHAR ExplicitSystemHeteroCpuPolicy
Definition: ketypes.h:1696
struct _KNODE::_flags Flags
struct _KLOCK_ENTRY_LOCK_STATE KLOCK_ENTRY_LOCK_STATE
volatile KSYSTEM_TIME TickCount
Definition: ketypes.h:1220
VOID(NTAPI * PKINTERRUPT_ROUTINE)(VOID)
Definition: ketypes.h:490
ULONG DisableBoost
Definition: ketypes.h:1657
ULONG Alertable
Definition: ketypes.h:1630
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
ULONG64 NpxState
Definition: ketypes.h:2000
SINGLE_LIST_ENTRY PropagateBoostsEntry
Definition: ketypes.h:1956
LIST_ENTRY InterruptListEntry
Definition: ketypes.h:869
volatile INT_PTR WaitStatus
Definition: ketypes.h:1731
int64_t LONGLONG
Definition: typedefs.h:68
struct _FIBER * PFIBER
KAFFINITY Affinity
Definition: ketypes.h:2041
int64_t LONG64
Definition: typedefs.h:68
struct _KPROCESS KPROCESS
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
VOID(NTAPI * PTIMER_APC_ROUTINE)(_In_ PVOID TimerContext, _In_ ULONG TimerLowValue, _In_ LONG TimerHighValue)
Definition: ketypes.h:1103
ULONG NTSYSAPI KeMaximumIncrement
Definition: clock.c:20
USHORT CpuBoostsBitmap
Definition: ketypes.h:1113
struct _KLOCK_ENTRY KLOCK_ENTRY
LIST_ENTRY Entry
Definition: ketypes.h:708
ULONG64 Start
Definition: ketypes.h:948
KIRQL Irql
Definition: ketypes.h:881
ULONG TebFlags
Definition: ketypes.h:192
ULONG KernelTime
Definition: ketypes.h:1919
VOID(NTAPI * PKRUNDOWN_ROUTINE)(IN struct _KAPC *Apc)
Definition: ketypes.h:680
ULONGLONG Rsvd1
Definition: ketypes.h:894
struct _THREAD_PERFORMANCE_DATA * UserData
Definition: ketypes.h:955
LONG High1Time
Definition: ketypes.h:918
UCHAR HeadNodeBit
Definition: ketypes.h:1037
UCHAR WaitingBit
Definition: ketypes.h:1023
ULONG MmShiftedColor
Definition: ketypes.h:826
enum _MODE MODE
#define PROCESSOR_FEATURE_MAX
__wchar_t WCHAR
Definition: xmlstorage.h:180
ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture
Definition: ketypes.h:1172
KAPC SchedulerApc
Definition: ketypes.h:1905
SINGLE_LIST_ENTRY SwapListEntry
Definition: ketypes.h:2037
UCHAR CrossThreadFlags
Definition: ketypes.h:1034
char CCHAR
Definition: typedefs.h:51
UCHAR Spare0
Definition: ketypes.h:1697
ULONG ExAcqResExclusiveNotAcquires
Definition: ketypes.h:744
uint64_t ULONGLONG
Definition: typedefs.h:67
UCHAR IoPriorityBit
Definition: ketypes.h:1038
SINGLE_LIST_ENTRY SwapListEntry
Definition: ketypes.h:1736
struct _KUSER_SHARED_DATA KUSER_SHARED_DATA
UCHAR Visited
Definition: ketypes.h:2059
BOOLEAN ShareVector
Definition: ketypes.h:886
ULONG DbgElevationEnabled
Definition: ketypes.h:1202
ULONG ExpectedRunTime
Definition: ketypes.h:1606
volatile VOID * StackLimit
Definition: ketypes.h:1597
signed char SCHAR
Definition: sqltypes.h:14
_In_ ULONG _In_ ULONG _In_ ULONG _Out_ PKIRQL _Out_ PKAFFINITY Affinity
Definition: halfuncs.h:170
ULONG MessageIndex
Definition: ketypes.h:873
enum _WAIT_TYPE WAIT_TYPE
struct _RTL_RB_TREE RTL_RB_TREE
FIXME: should move to rtltypes.h, but we can't include it here.
SINGLE_LIST_ENTRY IoSelfBoostsEntry
Definition: ketypes.h:1957
PKQUEUE Queue
Definition: ketypes.h:1738
KINTERRUPT_POLARITY Polarity
Definition: ketypes.h:889
ULONG64 QuantumTarget
Definition: ketypes.h:1595
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
Definition: ntbasedef.h:672
UCHAR WaitBlockFill8[FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]
Definition: ketypes.h:1787
ULONG ExReInitializeResourceCount
Definition: ketypes.h:733
struct _KSCHEDULING_GROUP * SchedulingGroup
Definition: ketypes.h:1609
PVOID LockUnsafe
Definition: ketypes.h:1069
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
struct _PP_LOOKASIDE_LIST * PPP_LOOKASIDE_LIST
ULONG ChargeOnlyGroup
Definition: ketypes.h:1664
UCHAR ForegroundBoost
Definition: ketypes.h:1855
struct _FIBER FIBER
LIST_ENTRY WaitListEntry
Definition: ketypes.h:1735
UCHAR AffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]
Definition: ketypes.h:1873
KEVENT SuspendEvent
Definition: ketypes.h:1939
UCHAR AdjustReason
Definition: ketypes.h:1860
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:802
ULONG GuaranteedStackBytes
Definition: ketypes.h:191
ULONG NumberOfPhysicalPages
Definition: ketypes.h:1184
ULONGLONG CycleTime
Definition: ketypes.h:2068
UCHAR AbEntrySummary
Definition: ketypes.h:1944
ULONG QuantumEndMigrate
Definition: ketypes.h:1636
enum _KINTERRUPT_POLARITY KINTERRUPT_POLARITY
unsigned __int64 ULONG64
Definition: imports.h:198
enum _TIMER_TYPE TIMER_TYPE
ULONG DisableStackCheck
Definition: ketypes.h:1646
ULONG ContextSwitches
Definition: ketypes.h:957
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _KTHREAD_COUNTERS KTHREAD_COUNTERS
ULONG Vector
Definition: ketypes.h:880
ULONG ExBoostExclusiveOwner
Definition: ketypes.h:768
COUNTER_READING HwCounter[16]
Definition: ketypes.h:960
PKSERVICE_ROUTINE ServiceRoutine
Definition: ketypes.h:870
UCHAR AbFreeEntryCount
Definition: ketypes.h:1974
UCHAR ThreadSeed
Definition: ketypes.h:2056
ULONG ExecutiveResourceConvertsCount
Definition: ketypes.h:739
_EVENT_TYPE
CSHORT Size
Definition: ketypes.h:849
PVOID NormalContext
Definition: ketypes.h:550
Definition: ketypes.h:687
UCHAR IdealNode
Definition: ketypes.h:2058
ULONG64 RelativeTimerBias
Definition: ketypes.h:1741
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:454
#define VOID
Definition: acefi.h:82
ULONG ExecutiveResourceContentionsCount
Definition: ketypes.h:736
Definition: ketypes.h:412
KEVENT LowEvent
Definition: ketypes.h:910
ULONG IdealProcessor
Definition: ketypes.h:1876
ULONG ExAcqResSharedWaitForExclusiveAcquiresExclusive
Definition: ketypes.h:758
ULONG_PTR InGlobalForegroundList
Definition: ketypes.h:1984
UCHAR SchedulerApcFill4[FIELD_OFFSET(KAPC, SystemArgument2)]
Definition: ketypes.h:1928
Definition: ketypes.h:535
LIST_ENTRY ReadyListHead
Definition: ketypes.h:2036
_MODE
Definition: ketypes.h:10
_KAPC_ENVIRONMENT
Definition: ketypes.h:695
Definition: typedefs.h:119
ULONG SpinLockSpinCount
Definition: ketypes.h:728
ULONG ForceDeferSchedule
Definition: ketypes.h:1667
struct _GETSETCONTEXT * PGETSETCONTEXT
UCHAR ApcStateFill[RTL_SIZEOF_THROUGH_FIELD(KAPC_STATE, UserApcPending)]
Definition: ketypes.h:1713
struct _KTHREAD KTHREAD
volatile ULONG ActiveConsoleId
Definition: ketypes.h:1180
volatile KSYSTEM_TIME TimeZoneBias
Definition: ketypes.h:1155
ULONG ExAcqResSharedAcquiresSharedRecursive
Definition: ketypes.h:748
UCHAR Color
Definition: ketypes.h:819
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
ULONG IpiSendRequestRoutineCount
Definition: ketypes.h:730
ULONG PriorityFloorSummary
Definition: ketypes.h:1959
KSPIN_LOCK ProcessLock
Definition: ketypes.h:2040
ULONG ExAcqResSharedStarveExclusiveAcquiresSharedRecursive
Definition: ketypes.h:754
ULONG CurrentRunTime
Definition: ketypes.h:1605
struct _KTIMER_TABLE * PKTIMER_TABLE
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
CSHORT Type
Definition: ketypes.h:908
UCHAR QuantumReset
Definition: ketypes.h:1914
ULONG ExAcqResExclusiveAcquiresExclusive
Definition: ketypes.h:741
#define _In_
Definition: no_sal2.h:158
PKSPIN_LOCK ActualLock
Definition: ketypes.h:878
PVOID StackBase
Definition: ketypes.h:1598
ULONG DispatchCode[DISPATCH_LENGTH]
Definition: ketypes.h:900
UCHAR SavedApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending)+1]
Definition: ketypes.h:1895
ULONG NTSYSAPI KeMinimumIncrement
Definition: clock.c:21
LONG High2Time
Definition: ketypes.h:919
ULONG QueueDeferPreemption
Definition: ketypes.h:1666
Definition: compat.h:694
ULONG DbgVirtEnabled
Definition: ketypes.h:1203
volatile ULONG DpcQueueDepth
Definition: ketypes.h:788
PVOID SessionState
Definition: ketypes.h:993
ULONG ExTryToAcqExclusiveAcquires
Definition: ketypes.h:767
ULONG DbgInstallerDetectEnabled
Definition: ketypes.h:1204
KLOCK_ENTRY LockEntries[NUMBER_OF_LOCK_ENTRIES]
Definition: ketypes.h:1955
ULONG SpinLockContentionCount
Definition: ketypes.h:727
CHAR PreviousMode
Definition: ketypes.h:1848
UCHAR SchedulerApcFill1[FIELD_OFFSET(KAPC, SpareByte1)]
Definition: ketypes.h:1913
WCHAR NtSystemRoot[260]
Definition: ketypes.h:1158
ULONG_PTR Segment
Definition: ketypes.h:856
_NT_PRODUCT_TYPE
struct _GENERAL_LOOKASIDE * P
Definition: ketypes.h:801
UCHAR ThreadLocalFlags
Definition: ketypes.h:1020
RTL_RB_TREE OwnerTree
Definition: ketypes.h:1096
ULONG CalloutActive
Definition: ketypes.h:1641
unsigned short USHORT
Definition: pedump.c:61
struct _SYNCH_COUNTERS * PSYNCH_COUNTERS
volatile ULONG64 TickCountQuad
Definition: ketypes.h:1221
CHAR PriorityDecrement
Definition: ketypes.h:1852
CHAR SuspendCount
Definition: ketypes.h:1897
ULONG_PTR KAFFINITY
Definition: compat.h:85
UCHAR Fill
Definition: ketypes.h:824
_Must_inspect_result_ _In_ PWDFDEVICE_INIT _In_ WDF_DEVICE_POWER_STATE PowerState
Definition: wdfdevice.h:3032
ULONG ExAcqResExclusiveWaits
Definition: ketypes.h:743
enum _ALTERNATIVE_ARCHITECTURE_TYPE ALTERNATIVE_ARCHITECTURE_TYPE
struct _KPROFILE * PKPROFILE
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
ULONG StaticState
Definition: ketypes.h:1046
volatile KAFFINITY ActiveProcessors
Definition: ketypes.h:2033
volatile ULONG64 CycleTime
Definition: ketypes.h:1600
UCHAR Spare0
Definition: ketypes.h:1024
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
LIST_ENTRY ProfileListHead
Definition: ketypes.h:2017
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
ULONG SpinLockAcquireCount
Definition: ketypes.h:726
UCHAR WaitBlockCount
Definition: ketypes.h:1875
#define OPTIONAL
Definition: typedefs.h:41
unsigned int * PULONG
Definition: retypes.h:1
ULONGLONG SystemCallPad[3]
Definition: ketypes.h:1218
CHAR AdjustIncrement
Definition: ketypes.h:1861
UCHAR NXSupportPolicy
Definition: ketypes.h:1178
ULONG ExInitializeResourceCount
Definition: ketypes.h:732
PVOID Wx86Tib
Definition: ketypes.h:188
Definition: bcd.h:201
CHAR Spare12
Definition: ketypes.h:1723
KIRQL SynchronizeIrql
Definition: ketypes.h:882
UCHAR SchedulerApcFill0[FIELD_OFFSET(KAPC, SpareByte0)]
Definition: ketypes.h:1908
ULONG KernelTime
Definition: ketypes.h:2034
LIST_ENTRY ThreadListEntry
Definition: ketypes.h:1940
XSAVE_FORMAT
Definition: ketypes.h:951
ULONG ReservedStackInUse
Definition: ketypes.h:1644
struct _KSCB * QueuedScb
Definition: ketypes.h:1998
ULONG LastSystemRITEventTickCount
Definition: ketypes.h:1183
PVOID Teb
Definition: ketypes.h:1739
UCHAR ExecuteEnable
Definition: ketypes.h:920
ULONG BucketShift
Definition: ketypes.h:854
enum _KTHREAD_STATE * PKTHREAD_STATE
ULONG UserTime
Definition: ketypes.h:1935
struct _KSERVICE_TABLE_DESCRIPTOR KSERVICE_TABLE_DESCRIPTOR
struct _KENTROPY_TIMING_STATE * PKENTROPY_TIMING_STATE
KEXECUTE_OPTIONS Flags
Definition: ketypes.h:2062
struct _COUNTER_READING COUNTER_READING
UCHAR ResourceIndex
Definition: ketypes.h:1909
DISPATCHER_HEADER Header
Definition: ketypes.h:1593
#define DISPATCH_LENGTH
Definition: ketypes.h:207
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
ULONG_PTR CrossThreadReleasable
Definition: ketypes.h:981
enum _KWAIT_REASON KWAIT_REASON
_ADJUST_REASON
Definition: ketypes.h:460
LIST_ENTRY GlobalForegroundListEntry
Definition: ketypes.h:1980
PVOID LegoData
Definition: ketypes.h:1929
UCHAR UserAffinityFill[FIELD_OFFSET(GROUP_AFFINITY, Reserved)]
Definition: ketypes.h:1847
BOOLEAN Running
Definition: ketypes.h:1611
PVOID SessionState
Definition: ketypes.h:1081
XSAVE_FORMAT * StateSaveArea
Definition: ketypes.h:1608
#define OUT
Definition: typedefs.h:40
KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTable[SSDT_MAX_ENTRIES]
Definition: procobj.c:23
enum _NT_PRODUCT_TYPE NT_PRODUCT_TYPE
volatile UCHAR State
Definition: ketypes.h:1721
PVOID Win32Thread
Definition: ketypes.h:1798
UCHAR InTreeByte
Definition: ketypes.h:1078
GROUP_AFFINITY Affinity
Definition: ketypes.h:1870
CSHORT Size
Definition: ketypes.h:868
_KTHREAD_STATE
Definition: ketypes.h:409
struct _KINTERRUPT KINTERRUPT
unsigned int ULONG
Definition: retypes.h:1
ULONG NTSYSAPI KeDcacheFlushCount
Definition: cpu.c:20
ULONG ContextSwitches
Definition: ketypes.h:1720
SHORT SListFaultCount
Definition: ketypes.h:1899
PRTL_BALANCED_NODE Root
Definition: ketypes.h:968
_In_ PLARGE_INTEGER _In_opt_ PTIMER_APC_ROUTINE _In_opt_ PVOID TimerContext
Definition: zwfuncs.h:428
ULONG DeferredProcessor
Definition: ketypes.h:1838
uint32_t * PULONG_PTR
Definition: typedefs.h:65
UCHAR PowerState
Definition: ketypes.h:2057
UCHAR NodeNumber
Definition: ketypes.h:821
UCHAR Preempted
Definition: ketypes.h:1859
struct _KEXECUTE_OPTIONS * PKEXECUTE_OPTIONS
ULONG WaitTime
Definition: ketypes.h:1807
volatile UCHAR Tag
Definition: ketypes.h:1693
ULONG ReadyTransition
Definition: ketypes.h:1623
ULONG IpiSendSoftwareInterruptCount
Definition: ketypes.h:731
ULONG DisableQuantum
Definition: ketypes.h:1663
UCHAR ApcStateIndex
Definition: ketypes.h:1874
SLIST_HEADER PfnDereferenceSListHead
Definition: ketypes.h:817
struct _KDPC_LIST * PKDPC_LIST
struct _KWAIT_BLOCK KWAIT_BLOCK
KAFFINITY ProcessorMask
Definition: ketypes.h:818
ULONG ApcQueueable
Definition: ketypes.h:1643
VOID(NTAPI * PKNORMAL_ROUTINE)(IN PVOID NormalContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL)
Definition: ketypes.h:674
KPROCESSOR_MODE WaitMode
Definition: ketypes.h:1728
PKDPC ActiveDpc
Definition: ketypes.h:792
UCHAR Seed
Definition: ketypes.h:820
KEVENT HighEvent
Definition: ketypes.h:911
ULONG ExAcqResSharedWaitForExclusiveWaits
Definition: ketypes.h:761
enum _KPROFILE_SOURCE KPROFILE_SOURCE
enum _HARDWARE_COUNTER_TYPE Type
Definition: ketypes.h:946
UCHAR WaitBlockFill9[1 *sizeof(KWAIT_BLOCK)+FIELD_OFFSET(KWAIT_BLOCK, SparePtr)]
Definition: ketypes.h:1792
ULONG UserTime
Definition: ketypes.h:2035
LONG AutoAlignment
Definition: ketypes.h:2046
PKINTERRUPT_ROUTINE DispatchAddress
Definition: ketypes.h:879
UCHAR ExecuteDispatchEnable
Definition: ketypes.h:923
short CSHORT
Definition: umtypes.h:127
_WAIT_TYPE
PVOID InitialStack
Definition: ketypes.h:1596
ULONG DbgErrorPortPresent
Definition: ketypes.h:1201
enum _ADJUST_REASON ADJUST_REASON
struct _KPROFILE KPROFILE
ULONG_PTR AffinityVersion
Definition: ketypes.h:1866
struct _KTIMER_TABLE_ENTRY KTIMER_TABLE_ENTRY
PVOID ServiceContext
Definition: ketypes.h:875
GROUP_AFFINITY UserAffinity
Definition: ketypes.h:1844
struct _KLOCK_ENTRY * PKLOCK_ENTRY
ULONG_PTR NTSYSAPI KiBugCheckData[]
Definition: bug.c:27
struct _KNODE * PKNODE
KSPIN_LOCK ThreadLock
Definition: ketypes.h:1599
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:315
ULONG FreeCount[2]
Definition: ketypes.h:827
KWAIT_STATUS_REGISTER WaitRegister
Definition: ketypes.h:1610
ULONG GuiThread
Definition: ketypes.h:1662
ULONG ProcessStackCountDecremented
Definition: ketypes.h:1681
SERVICE_TABLE_ENTRYW ServiceTable[]
Definition: service.c:21
PVOID VdmTrapcHandler
Definition: ketypes.h:2038
ULONG SystemCallNumber
Definition: ketypes.h:1701
ULONG ExAcqResSharedWaitForExclusiveNotAcquires
Definition: ketypes.h:762
ULONG ExecutiveResourceReleaseExclusiveCount
Definition: ketypes.h:737
struct _ACTIVATION_CONTEXT_STACK * ActivationContextStackPointer
Definition: ketypes.h:189
* PKAPC_STATE
Definition: ketypes.h:1280
ULONG ComPlusPackage
Definition: ketypes.h:1182
#define THREAD_WAIT_OBJECTS
Definition: ketypes.h:480
BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX]
Definition: ketypes.h:1168
struct _KSERVICE_TABLE_DESCRIPTOR * PKSERVICE_TABLE_DESCRIPTOR
_KCONTINUE_STATUS
Definition: ketypes.h:470
DISPATCHER_HEADER Header
Definition: ketypes.h:2016
volatile SHORT KeReferenceCount
Definition: ketypes.h:1966
ULONG ThreadFlagsSpare
Definition: ketypes.h:1682
LIST_ENTRY MutantListHead
Definition: ketypes.h:1941
UCHAR WaitBlockFill11[3 *sizeof(KWAIT_BLOCK)+FIELD_OFFSET(KWAIT_BLOCK, Object)]
Definition: ketypes.h:1802
ULONG ExEtwSynchTrackingNotificationsAccountedCount
Definition: ketypes.h:771
volatile ULONG DismountCount
Definition: ketypes.h:1181
KIRQL WaitIrql
Definition: ketypes.h:1727
BOOLEAN ProductTypeIsValid
Definition: ketypes.h:1165
ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES]
Definition: ketypes.h:1231
struct _KNODE KNODE
struct _PP_LOOKASIDE_LIST PP_LOOKASIDE_LIST
KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES]
Definition: procobj.c:24