ReactOS  r76032
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 //
225 // Maximum WOW64 Entries in KUSER_SHARED_DATA
226 //
227 #define MAX_WOW64_SHARED_ENTRIES 16
228 
229 //
230 // Maximum Processor Features supported in KUSER_SHARED_DATA
231 //
232 #define PROCESSOR_FEATURE_MAX 64
233 
234 //
235 // Event Types
236 //
237 typedef enum _EVENT_TYPE
238 {
241 } EVENT_TYPE;
242 
243 //
244 // Timer Types
245 //
246 typedef enum _TIMER_TYPE
247 {
250 } TIMER_TYPE;
251 
252 //
253 // Wait Types
254 //
255 typedef enum _WAIT_TYPE
256 {
257  WaitAll,
258  WaitAny
259 } WAIT_TYPE;
260 
261 //
262 // Processor Execution Modes
263 //
264 typedef enum _MODE
265 {
266  KernelMode,
267  UserMode,
269 } MODE;
270 
271 //
272 // Wait Reasons
273 //
274 typedef enum _KWAIT_REASON
275 {
276  Executive,
277  FreePage,
278  PageIn,
281  Suspended,
282  UserRequest,
283  WrExecutive,
284  WrFreePage,
285  WrPageIn,
288  WrSuspended,
290  WrEventPair,
291  WrQueue,
292  WrLpcReceive,
293  WrLpcReply,
295  WrPageOut,
296  WrRendezvous,
297  Spare2,
299  Spare4,
300  Spare5,
301  Spare6,
302  WrKernel,
303  WrResource,
304  WrPushLock,
305  WrMutex,
306  WrQuantumEnd,
308  WrPreempted,
311 } KWAIT_REASON;
312 
313 //
314 // Profiling Sources
315 //
316 typedef enum _KPROFILE_SOURCE
317 {
318  ProfileTime,
344 
345 //
346 // NT Product and Architecture Types
347 //
348 typedef enum _NT_PRODUCT_TYPE
349 {
350  NtProductWinNt = 1,
354 
356 {
358  NEC98x86,
361 
362 #endif
363 
364 //
365 // Thread States
366 //
367 typedef enum _KTHREAD_STATE
368 {
377 #if (NTDDI_VERSION >= NTDDI_WS03)
379 #endif
381 
382 //
383 // Kernel Object Types
384 //
385 typedef enum _KOBJECTS
386 {
405  ApcObject = 18,
406  DpcObject = 19,
413 } KOBJECTS;
414 
415 //
416 // Adjust reasons
417 //
418 typedef enum _ADJUST_REASON
419 {
423 } ADJUST_REASON;
424 
425 //
426 // Continue Status
427 //
428 typedef enum _KCONTINUE_STATUS
429 {
435 
436 //
437 // Process States
438 //
439 typedef enum _KPROCESS_STATE
440 {
447 
448 //
449 // NtVdmControl Classes
450 //
451 typedef enum _VDMSERVICECLASS
452 {
469 
470 #ifdef NTOS_MODE_USER
471 
472 //
473 // APC Normal Routine
474 //
475 typedef VOID
477  _In_ PVOID NormalContext,
480 );
481 
482 //
483 // Timer Routine
484 //
485 typedef VOID
488  _In_ ULONG TimerLowValue,
489  _In_ LONG TimerHighValue
490 );
491 
492 //
493 // System Time Structure
494 //
495 typedef struct _KSYSTEM_TIME
496 {
497  ULONG LowPart;
498  LONG High1Time;
499  LONG High2Time;
501 
502 //
503 // Shared Kernel User Data
504 //
505 typedef struct _KUSER_SHARED_DATA
506 {
509  volatile KSYSTEM_TIME InterruptTime;
510  volatile KSYSTEM_TIME SystemTime;
511  volatile KSYSTEM_TIME TimeZoneBias;
514  WCHAR NtSystemRoot[260];
519  ULONG Reserved2[7];
527  volatile ULONG TimeSlip;
532 #if (NTDDI_VERSION >= NTDDI_WINXPSP2)
534 #endif
535  volatile ULONG ActiveConsoleId;
536  volatile ULONG DismountCount;
541  ULONG TraceLogging;
542  ULONG Fill0;
547  union {
548  volatile KSYSTEM_TIME TickCount;
549  volatile ULONG64 TickCountQuad;
550  };
551  ULONG Cookie;
552 #if (NTDDI_VERSION >= NTDDI_WS03)
555 #endif
556 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
558  ULONG HeapTracingPid[2];
559  ULONG CritSecTracingPid[2];
560  union
561  {
563  struct
564  {
569  ULONG SpareBits:28;
570  };
571  };
573  KAFFINITY ActiveProcessorAffinity;
574 #endif
576 
577 //
578 // VDM Structures
579 //
580 #include "pshpack1.h"
581 typedef struct _VdmVirtualIca
582 {
583  LONG ica_count[8];
584  LONG ica_int_line;
585  LONG ica_cpu_int;
586  USHORT ica_base;
587  USHORT ica_hipiri;
588  USHORT ica_mode;
589  UCHAR ica_master;
590  UCHAR ica_irr;
591  UCHAR ica_isr;
592  UCHAR ica_imr;
593  UCHAR ica_ssr;
594 } VDMVIRTUALICA, *PVDMVIRTUALICA;
595 #include "poppack.h"
596 
597 typedef struct _VdmIcaUserData
598 {
599  PVOID pIcaLock;
600  PVDMVIRTUALICA pIcaMaster;
601  PVDMVIRTUALICA pIcaSlave;
602  PULONG pDelayIrq;
603  PULONG pUndelayIrq;
604  PULONG pDelayIret;
605  PULONG pIretHooked;
606  PULONG pAddrIretBopTable;
607  PHANDLE phWowIdleEvent;
608  PLARGE_INTEGER pIcaTimeout;
609  PHANDLE phMainThreadSuspended;
610 } VDMICAUSERDATA, *PVDMICAUSERDATA;
611 
612 typedef struct _VDM_INITIALIZE_DATA
613 {
614  PVOID TrapcHandler;
615  PVDMICAUSERDATA IcaUserData;
616 } VDM_INITIALIZE_DATA, *PVDM_INITIALIZE_DATA;
617 
618 #else
619 
620 //
621 // System Thread Start Routine
622 //
623 typedef
624 VOID
627  PVOID StartContext
628 );
629 
630 #ifndef _NTSYSTEM_
631 typedef VOID
633  IN PVOID NormalContext OPTIONAL,
636 
637 typedef VOID
639  IN struct _KAPC *Apc);
640 
641 typedef VOID
643  IN struct _KAPC *Apc,
644  IN OUT PKNORMAL_ROUTINE *NormalRoutine OPTIONAL,
648 #endif
649 
650 //
651 // APC Environment Types
652 //
653 typedef enum _KAPC_ENVIRONMENT
654 {
660 
661 typedef struct _KTIMER_TABLE_ENTRY
662 {
663 #if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM) || defined(_M_AMD64)
665 #endif
669 
670 typedef struct _KTIMER_TABLE
671 {
675 
676 typedef struct _KDPC_LIST
677 {
681 
682 typedef struct _SYNCH_COUNTERS
683 {
731 
732 //
733 // PRCB DPC Data
734 //
735 typedef struct _KDPC_DATA
736 {
737 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
739 #else
740  LIST_ENTRY DpcListHead;
741 #endif
743 #if defined(_M_AMD64) || defined(_M_ARM)
744  volatile LONG DpcQueueDepth;
745 #else
747 #endif
749 #if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(_M_ARM)
751 #endif
753 
754 //
755 // Per-Processor Lookaside List
756 //
757 typedef struct _PP_LOOKASIDE_LIST
758 {
762 
763 //
764 // Architectural Types
765 //
766 #include <arch/ketypes.h>
767 
768 //
769 // Kernel Memory Node
770 //
771 #include <pshpack1.h>
772 typedef struct _KNODE
773 {
780  struct _flags {
782  UCHAR Fill : 7;
783  } Flags;
787 } KNODE, *PKNODE;
788 #include <poppack.h>
789 
790 //
791 // Structure for Get/SetContext APC
792 //
793 typedef struct _GETSETCONTEXT
794 {
800 
801 //
802 // Kernel Profile Object
803 //
804 typedef struct _KPROFILE
805 {
818 } KPROFILE, *PKPROFILE;
819 
820 //
821 // Kernel Interrupt Object
822 //
823 typedef struct _KINTERRUPT
824 {
829 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
832 #endif
846 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
848 #endif
851 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
853 #endif
854 #ifdef _M_AMD64
855  PKTRAP_FRAME TrapFrame;
856  PVOID Reserved;
857 #endif
859 } KINTERRUPT;
860 
861 //
862 // Kernel Event Pair Object
863 //
864 typedef struct _KEVENT_PAIR
865 {
871 
872 //
873 // Kernel No Execute Options
874 //
875 typedef struct _KEXECUTE_OPTIONS
876 {
885 
886 #if (NTDDI_VERSION >= NTDDI_WIN7)
888 {
890  struct
891  {
895  UCHAR Apc:1;
899  };
901 
902 typedef struct _COUNTER_READING
903 {
909 
910 typedef struct _KTHREAD_COUNTERS
911 {
913  struct _THREAD_PERFORMANCE_DATA* UserData;
920 #endif
921 
922 //
923 // Kernel Thread (KTHREAD)
924 //
925 typedef struct _KTHREAD
926 {
928 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
930 #ifndef _WIN64 // [
932 #endif // ]
934 #else // ][
936 #endif // ]
938  ULONG_PTR StackLimit; // FIXME: PVOID
941 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
945  union
946  {
947  struct
948  {
963  };
965  };
966 #endif // ]
967  union
968  {
970  struct
971  {
972  UCHAR ApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1];
973 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
975 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
976  /* On x86, the following members "fall out" of the union */
979 #else // ][
980  /* On x86, the following members "fall out" of the union */
981  volatile USHORT NextProcessor;
982  volatile USHORT DeferredProcessor;
983 #endif // ]
984 #else // ][
986  /* On x86, the following members "fall out" of the union */
987  volatile UCHAR NextProcessor;
988  volatile UCHAR DeferredProcessor;
991 #endif // ]
992  };
993  };
995 #ifndef _M_AMD64 // [
997  volatile UCHAR State;
1001 #endif // ]
1003 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1005 #else // ][
1006  union
1007  {
1010  };
1011 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1012  union
1013  {
1014  struct
1015  {
1019  ULONG WaitNext:1;
1021  ULONG Alertable:1;
1023  ULONG Reserved:25;
1024  };
1025  LONG MiscFlags;
1026  };
1027 #else // ][
1029  BOOLEAN WaitNext;
1030 #endif // ]
1031  UCHAR WaitReason;
1032 #if (NTDDI_VERSION < NTDDI_LONGHORN)
1033  SCHAR Priority;
1035 #endif // ]
1036  volatile UCHAR SwapBusy;
1038 #endif // ]
1039  union
1040  {
1043  };
1045 #ifndef _M_AMD64 // [
1047  union
1048  {
1049  struct
1050  {
1053  };
1055  };
1056 #endif // ]
1057  struct _TEB *Teb;
1058 
1059 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1061 #else // ][
1062  union
1063  {
1064  KTIMER Timer;
1065  struct
1066  {
1067  UCHAR TimerFill[FIELD_OFFSET(KTIMER, Period) + sizeof(LONG)];
1068 #if !defined(_WIN64) // [
1069  };
1070  };
1071 #endif // ]
1072 #endif // ]
1073  union
1074  {
1075  struct
1076  {
1079 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1088 #else // ][
1089  LONG ReservedFlags:30;
1090 #endif // ]
1091  };
1093  };
1094 #if defined(_WIN64) && (NTDDI_VERSION < NTDDI_WIN7) // [
1095  };
1096  };
1097 #endif // ]
1098 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1099 #if defined(_WIN64) // [
1100  ULONG Spare0;
1101 #else // ][
1103 #endif // ]
1104 #endif // ]
1105  union
1106  {
1108 #if (NTDDI_VERSION < NTDDI_WIN7) // [
1109  struct
1110  {
1111  UCHAR WaitBlockFill0[FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 32bit = 23, 64bit = 43
1112 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1113  UCHAR IdealProcessor;
1114 #else // ][
1115  BOOLEAN SystemAffinityActive;
1116 #endif // ]
1117  };
1118  struct
1119  {
1120  UCHAR WaitBlockFill1[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 47 / 91
1122  };
1123  struct
1124  {
1125  UCHAR WaitBlockFill2[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 71 / 139
1126  UCHAR ResourceIndex;
1127  };
1128  struct
1129  {
1130  UCHAR WaitBlockFill3[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareByte)]; // 95 / 187
1131  UCHAR LargeStack;
1132  };
1133 #endif // ]
1134 #ifdef _M_AMD64 // [
1135  struct
1136  {
1137  UCHAR WaitBlockFill4[FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1138  ULONG ContextSwitches;
1139  };
1140  struct
1141  {
1142  UCHAR WaitBlockFill5[1 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1143  UCHAR State;
1144  UCHAR NpxState;
1145  UCHAR WaitIrql;
1146  CHAR WaitMode;
1147  };
1148  struct
1149  {
1150  UCHAR WaitBlockFill6[2 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1151  ULONG WaitTime;
1152  };
1153 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1154  struct
1155  {
1156  UCHAR WaitBlockFill7[168];
1157  PVOID TebMappedLowVa;
1158  struct _UMS_CONTROL_BLOCK* Ucb;
1159  };
1160 #endif // ]
1161  struct
1162  {
1163 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1164  UCHAR WaitBlockFill8[188];
1165 #else // ][
1166  UCHAR WaitBlockFill7[3 * sizeof(KWAIT_BLOCK) + FIELD_OFFSET(KWAIT_BLOCK, SpareLong)];
1167 #endif // ]
1168  union
1169  {
1170  struct
1171  {
1172  SHORT KernelApcDisable;
1173  SHORT SpecialApcDisable;
1174  };
1175  ULONG CombinedApcDisable;
1176  };
1177  };
1178 #endif // ]
1179  };
1182 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1184  union // 2 elements, 0x8 bytes (sizeof)
1185  {
1188  };
1189 #else // ][
1190  PVOID CallbackStack;
1191 #endif // ]
1192 #if (NTDDI_VERSION < NTDDI_LONGHORN) || ((NTDDI_VERSION < NTDDI_WIN7) && !defined(_WIN64)) // [
1194 #endif // ]
1195 #if (NTDDI_VERSION < NTDDI_LONGHORN) && defined(_WIN64) // [
1196  ULONG KernelLimit;
1197 #endif // ]
1199 #if (NTDDI_VERSION < NTDDI_LONGHORN) // [
1200  UCHAR IdealProcessor;
1201  BOOLEAN Preempted;
1202  BOOLEAN ProcessReadyQueue;
1203 #ifdef _WIN64 // [
1204  PVOID Win32kTable;
1205  ULONG Win32kLimit;
1206 #endif // ]
1207  BOOLEAN KernelStackResident;
1208 #endif // ]
1211 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1215 #if (NTDDI_VERSION >= NTDDI_WIN7)
1217 #else
1218  UCHAR Spare01;
1219 #endif
1220 #endif // ]
1222 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1224 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1226 #else // ][
1227  ULONG Spare02;
1228 #endif // ]
1229 #endif // ]
1230 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1236 #else // ][
1237  KAFFINITY UserAffinity;
1238  struct _KPROCESS *Process;
1240 #endif // ]
1241  PKAPC_STATE ApcStatePointer[2];
1242  union
1243  {
1245  struct
1246  {
1247  UCHAR SavedApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending) + 1];
1248 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1250 #else // ][
1251  CCHAR FreezeCount;
1252 #endif // ]
1253 #ifndef _WIN64 // [
1254  };
1255  };
1256 #endif // ]
1258 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1260 #else // ][
1261  UCHAR UserIdealProcessor;
1262 #endif // ]
1263 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1264 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1265  UCHAR Spare03;
1266 #else // ][
1267  UCHAR CalloutActive;
1268 #endif // ]
1269 #ifdef _WIN64 // [
1270  UCHAR CodePatchInProgress;
1271  };
1272  };
1273 #endif // ]
1274 #if defined(_M_IX86) // [
1275 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1276  UCHAR OtherPlatformFill;
1277 #else // ][
1278  UCHAR Iopl;
1279 #endif // ]
1280 #endif // ]
1283  union
1284  {
1286  struct
1287  {
1288  UCHAR SuspendApcFill0[1];
1289 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1291 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1292  CHAR Spare04;
1293 #else // ][
1294  SCHAR Quantum;
1295 #endif // ]
1296  };
1297  struct
1298  {
1299  UCHAR SuspendApcFill1[3];
1301  };
1302  struct
1303  {
1304  UCHAR SuspendApcFill2[4];
1306  };
1307  struct
1308  {
1310 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
1312 #else
1313  PVOID TlsArray;
1314 #endif
1315  };
1316  struct
1317  {
1318  UCHAR SuspendApcFill4[FIELD_OFFSET(KAPC, SystemArgument2)]; // 40 / 72
1320  };
1321  struct
1322  {
1323  UCHAR SuspendApcFill5[FIELD_OFFSET(KAPC, Inserted) + 1]; // 47 / 83
1324 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1326 #else // ][
1327  UCHAR PowerState;
1328 #endif // ]
1329 #ifdef _WIN64 // [
1330  ULONG UserTime;
1331 #endif // ]
1332  };
1333  };
1334 #ifndef _WIN64 // [
1336 #endif // ]
1337  union
1338  {
1340  struct
1341  {
1342  UCHAR SuspendSemaphorefill[FIELD_OFFSET(KSEMAPHORE, Limit) + 4]; // 20 / 28
1343 #ifdef _WIN64 // [
1344  ULONG SListFaultCount;
1345 #endif // ]
1346  };
1347  };
1348 #ifndef _WIN64 // [
1350 #endif // ]
1352 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1354 #endif // ]
1356 #ifdef _M_AMD64 // [
1357  LONG64 ReadOperationCount;
1358  LONG64 WriteOperationCount;
1359  LONG64 OtherOperationCount;
1360  LONG64 ReadTransferCount;
1361  LONG64 WriteTransferCount;
1362  LONG64 OtherTransferCount;
1363 #endif // ]
1364 #if (NTDDI_VERSION >= NTDDI_WIN7) // [
1367 #elif (NTDDI_VERSION >= NTDDI_LONGHORN) // ][
1368  PVOID MdlForLockedTeb;
1369 #endif // ]
1370 } KTHREAD;
1371 
1372 #define ASSERT_THREAD(object) \
1373  ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == ThreadObject))
1374 
1375 //
1376 // Kernel Process (KPROCESS)
1377 //
1378 typedef struct _KPROCESS
1379 {
1382 #if (NTDDI_VERSION >= NTDDI_LONGHORN)
1385 #else
1387 #endif
1388 #if defined(_M_IX86)
1389  KGDTENTRY LdtDescriptor;
1390  KIDTENTRY Int21Descriptor;
1391 #endif
1393 #if defined(_M_IX86)
1394  UCHAR Iopl;
1395  UCHAR Unused;
1396 #endif
1406  union
1407  {
1408  struct
1409  {
1414  };
1416  };
1424  union
1425  {
1428  };
1431 #if (NTDDI_VERSION >= NTDDI_LONGHORN) // [
1433 #endif // ]
1434 } KPROCESS;
1435 
1436 #define ASSERT_PROCESS(object) \
1437  ASSERT((((object)->Header.Type & KOBJECT_TYPE_MASK) == ProcessObject))
1438 
1439 //
1440 // System Service Table Descriptor
1441 //
1443 {
1447 #if defined(_IA64_)
1448  LONG TableBaseGpOffset;
1449 #endif
1452 
1453 #if (NTDDI_VERSION >= NTDDI_WIN8)
1454 //
1455 // Entropy Timing State
1456 //
1458 {
1465 
1466 //
1467 // Constants from ks386.inc, ksamd64.inc and ksarm.h
1468 //
1469 #define KENTROPY_TIMING_INTERRUPTS_PER_BUFFER 0x400
1470 #define KENTROPY_TIMING_BUFFER_MASK 0x7ff
1471 #define KENTROPY_TIMING_ANALYSIS 0x0
1472 
1473 #endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
1474 
1475 //
1476 // Exported Loader Parameter Block
1477 //
1479 
1480 //
1481 // Exported Hardware Data
1482 //
1490 
1491 //
1492 // Exported System Service Descriptor Tables
1493 //
1496 
1497 #endif // !NTOS_MODE_USER
1498 
1499 #endif // _KETYPES_H
DWORD *typedef PVOID
Definition: winlogon.h:52
ULONG LargePageMinimum
Definition: ketypes.h:1140
BOOLEAN Started
Definition: ketypes.h:817
ULONG ServiceCount
Definition: ketypes.h:849
_KWAIT_REASON
Definition: ketypes.h:402
CSHORT Type
Definition: ketypes.h:806
PVOID StackBase
Definition: ketypes.h:183
SCHAR QuantumReset
Definition: ketypes.h:1418
LONG ThreadFlags
Definition: ketypes.h:1092
ULONG LowPart
Definition: ketypes.h:895
CONTEXT FiberContext
Definition: ketypes.h:186
struct _KTIMER_TABLE KTIMER_TABLE
ULONG NtMinorVersion
Definition: ketypes.h:1145
PVOID Buffer
Definition: ketypes.h:813
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1128
ULONG ExAcqResSharedWaitForExclusiveAttempts
Definition: ketypes.h:715
BOOLEAN Alerted[2]
Definition: ketypes.h:944
ULONG FreezeCount
Definition: ketypes.h:1225
#define IN
Definition: typedefs.h:38
ULONG SharedDataFlags
Definition: ketypes.h:1177
_VDMSERVICECLASS
Definition: ketypes.h:451
enum _KPROFILE_SOURCE KPROFILE_SOURCE
enum _KPROCESS_STATE * PKPROCESS_STATE
BOOLEAN Connected
Definition: ketypes.h:842
KAFFINITY Affinity
Definition: ketypes.h:815
VOID(NTAPI * PKINTERRUPT_ROUTINE)(VOID)
Definition: ketypes.h:475
KSPIN_LOCK Lock
Definition: ketypes.h:664
USHORT UserModeGlobalLogger[16]
Definition: ketypes.h:1213
_In_ UCHAR _In_ POWER_STATE PowerState
Definition: pofuncs.h:42
ULONG UserIdealProcessor
Definition: ketypes.h:1235
KAPC_STATE
Definition: ketypes.h:1258
ULONG TimerActive
Definition: ketypes.h:961
struct _KENTROPY_TIMING_STATE KENTROPY_TIMING_STATE
LONG DisableBoost
Definition: ketypes.h:1411
_KPROCESS_STATE
Definition: ketypes.h:439
ULONG ExTryToAcqExclusiveAttempts
Definition: ketypes.h:724
PVOID RangeBase
Definition: ketypes.h:810
struct _KDPC_DATA KDPC_DATA
KSPIN_LOCK SpinLock
Definition: ketypes.h:834
ULONG Reserved2[7]
Definition: ketypes.h:1141
CONTEXT Context
Definition: ketypes.h:798
enum _KAPC_ENVIRONMENT KAPC_ENVIRONMENT
ULONG EnableStackSwap
Definition: ketypes.h:1085
SCHAR PriorityDecrement
Definition: ketypes.h:1210
_ALTERNATIVE_ARCHITECTURE_TYPE
Definition: ketypes.h:868
KTIMER_TABLE_ENTRY TimerEntries[256]
Definition: ketypes.h:673
ULONG_PTR DirectoryTableBase
Definition: ketypes.h:1383
enum _KOBJECTS KOBJECTS
UCHAR State
Definition: ketypes.h:1419
SHORT SpecialApcDisable
Definition: ketypes.h:1052
Definition: ntbasedef.h:627
ULONG CombinedApcDisable
Definition: ketypes.h:1054
KSPIN_LOCK ApcQueueLock
Definition: ketypes.h:994
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
SINGLE_LIST_ENTRY * LastEntry
Definition: ketypes.h:679
ULONG ExSetResOwnerPointerExclusive
Definition: ketypes.h:721
LARGE_INTEGER SystemExpirationDate
Definition: ketypes.h:1152
__wchar_t WCHAR
Definition: xmlstorage.h:180
ULONG UserStackWalkActive
Definition: ketypes.h:956
SCHAR BasePriority
Definition: ketypes.h:1417
KAPC_STATE SavedApcState
Definition: ketypes.h:1244
LONG ProcessFlags
Definition: ketypes.h:1415
ULONG ExSetResOwnerPointerSharedOld
Definition: ketypes.h:723
ULONG ExAcqResExclusiveAttempts
Definition: ketypes.h:698
PVOID ServiceTable
Definition: ketypes.h:1102
PVOID StackLimit
Definition: ketypes.h:184
_KOBJECTS
Definition: ketypes.h:385
unsigned char * PUCHAR
Definition: retypes.h:3
char CHAR
Definition: xmlstorage.h:175
CSHORT Size
Definition: ketypes.h:867
PKSERVICE_ROUTINE MessageServiceRoutine
Definition: ketypes.h:830
USHORT IopmOffset
Definition: ketypes.h:1392
PVOID SListFaultAddress
Definition: ketypes.h:1355
ULONG HighCycleTime
Definition: ketypes.h:931
struct _KTIMER_TABLE_ENTRY * PKTIMER_TABLE_ENTRY
LONGLONG ConsoleSessionForegroundProcessId
Definition: ketypes.h:1208
union _KWAIT_STATUS_REGISTER KWAIT_STATUS_REGISTER
ULONGLONG TestRetInstruction
Definition: ketypes.h:1193
SCHAR Priority
Definition: ketypes.h:974
ULONG MaxStackTraceDepth
Definition: ketypes.h:1137
enum _KCONTINUE_STATUS KCONTINUE_STATUS
struct _KUSER_SHARED_DATA * PKUSER_SHARED_DATA
ULONG64 Total
Definition: ketypes.h:907
UCHAR Removable
Definition: ketypes.h:781
struct _KDPC_LIST KDPC_LIST
ULONG CryptoExponent
Definition: ketypes.h:1138
CHAR Saturation
Definition: ketypes.h:1221
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1268
PVOID CallbackStack
Definition: ketypes.h:1186
PKTRAP_FRAME TrapFrame
Definition: ketypes.h:1181
struct _KEXECUTE_OPTIONS KEXECUTE_OPTIONS
ULONG ExEtwSynchTrackingNotificationsCount
Definition: ketypes.h:728
ULONG IpiSendRequestBroadcastCount
Definition: ketypes.h:687
ULONG ExAcqResSharedAttempts
Definition: ketypes.h:703
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
volatile ULONG TimeSlip
Definition: ketypes.h:1149
PKWAIT_BLOCK WaitBlockList
Definition: ketypes.h:1004
CSHORT Type
Definition: ketypes.h:825
ULONG EtwStackTraceApc2Inserted
Definition: ketypes.h:1081
#define SSDT_MAX_ENTRIES
Definition: ketypes.h:100
struct _KEVENT_PAIR * PKEVENT_PAIR
ULONG ProcessReadyQueue
Definition: ketypes.h:951
struct _KEVENT_PAIR KEVENT_PAIR
ULONG NTSYSAPI KiDmaIoCoherency
Definition: cpu.c:33
struct _SINGLE_LIST_ENTRY * PfnDeferredList
Definition: ketypes.h:786
ULONG NTSYSAPI KeIcacheFlushCount
Definition: cpu.c:19
volatile KSYSTEM_TIME InterruptTime
Definition: ketypes.h:1131
volatile ULONG ActiveProcessors
Definition: ketypes.h:1397
BOOLEAN Preempted
Definition: ketypes.h:1212
#define NTSYSAPI
Definition: ntoskrnl.h:14
ULONG ExAcqResExclusiveAcquiresExclusiveRecursive
Definition: ketypes.h:700
struct _TEB * Teb
Definition: ketypes.h:1057
BOOLEAN FloatingSave
Definition: ketypes.h:841
UCHAR ExecuteDisable
Definition: ketypes.h:877
ULONG ExAcqResSharedStarveExclusiveAttempts
Definition: ketypes.h:709
ULONG ExAcqResSharedStarveExclusiveWaits
Definition: ketypes.h:713
struct _SYNCH_COUNTERS SYNCH_COUNTERS
ULONG SystemCallReturn
Definition: ketypes.h:1195
ULONG64 HardwareCounters
Definition: ketypes.h:917
ULONG_PTR DpcLock
Definition: ketypes.h:742
ULONG ExAcqResSharedWaits
Definition: ketypes.h:707
ULONG UmsDirectedSwitchEnable
Definition: ketypes.h:960
ULONG ExAcqResSharedStarveExclusiveAcquiresExclusive
Definition: ketypes.h:710
PKTIMER TimerExpiry[64]
Definition: ketypes.h:672
struct _KDPC_DATA * PKDPC_DATA
KINTERRUPT_MODE Mode
Definition: ketypes.h:845
enum _KPROCESS_STATE KPROCESS_STATE
KSERVICE_ROUTINE * PKSERVICE_ROUTINE
Definition: ketypes.h:485
ULONG_PTR StackLimit
Definition: ketypes.h:938
ULONG ExAcqResSharedAcquiresExclusive
Definition: ketypes.h:704
Definition: ketypes.h:661
_TIMER_TYPE
PKPRCB WaitPrcb
Definition: ketypes.h:1311
uint32_t ULONG_PTR
Definition: typedefs.h:63
BOOLEAN SafeBootMode
Definition: ketypes.h:1163
LONG ReservedFlags
Definition: ketypes.h:1413
SLIST_HEADER DeadStackList
Definition: ketypes.h:774
ULONG AutoAlignment
Definition: ketypes.h:1077
PVOID FiberData
Definition: ketypes.h:181
BOOLEAN NTSYSAPI KiEnableTimerWatchdog
Definition: timerobj.c:20
UCHAR LargeStack
Definition: ketypes.h:1325
struct _COUNTER_READING * PCOUNTER_READING
UCHAR KIRQL
Definition: env_spec_w32.h:591
struct _KPROCESS * Process
Definition: ketypes.h:809
ULONG ExecutiveResourceReleaseSharedCount
Definition: ketypes.h:696
enum _NT_PRODUCT_TYPE * PNT_PRODUCT_TYPE
ULONG ExBoostSharedOwners
Definition: ketypes.h:727
struct _GETSETCONTEXT GETSETCONTEXT
PXSTATE_SAVE XStateSave
Definition: ketypes.h:1366
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
KSEMAPHORE SuspendSemaphore
Definition: ketypes.h:1339
LONG MiscFlags
Definition: ketypes.h:964
ULONG NtMajorVersion
Definition: ketypes.h:1144
SHORT KernelApcDisable
Definition: ketypes.h:1051
KPROFILE_SOURCE Source
Definition: ketypes.h:816
ULONG ImageFileExecutionOptions
Definition: ketypes.h:1219
ULONG TickCount
Definition: ketypes.h:835
KSTART_ROUTINE * PKSTART_ROUTINE
Definition: ketypes.h:472
volatile KSYSTEM_TIME SystemTime
Definition: ketypes.h:1132
ULONG ExAcqResSharedWaitForExclusiveAcquiresShared
Definition: ketypes.h:717
ULONG_PTR CallbackDepth
Definition: ketypes.h:1187
ULONG ExAcqResSharedStarveExclusiveAcquiresShared
Definition: ketypes.h:711
ULONG ExAcqResSharedStarveExclusiveNotAcquires
Definition: ketypes.h:714
ULONG ExAcqResSharedNotAcquires
Definition: ketypes.h:708
long LONG
Definition: pedump.c:60
ULONG ExSetResOwnerPointerSharedNew
Definition: ketypes.h:722
UCHAR ExecuteOptions
Definition: ketypes.h:1427
NT_PRODUCT_TYPE NtProductType
Definition: ketypes.h:1142
KDPC_LIST DpcList
Definition: ketypes.h:738
KAPC_STATE ApcState
Definition: ketypes.h:969
short SHORT
Definition: pedump.c:59
ULONG SystemAffinityActive
Definition: ketypes.h:953
struct _KTHREAD_COUNTERS * PKTHREAD_COUNTERS
PVOID FirstArgument
Definition: ketypes.h:1183
uint64_t ULONG64
Definition: typedefs.h:65
BOOLEAN KdDebuggerEnabled
Definition: ketypes.h:1154
KEVENT Event
Definition: ketypes.h:796
ULONG WaitNext
Definition: ketypes.h:952
ULONG ExAcqResSharedAcquiresShared
Definition: ketypes.h:705
ULONG TickCountMultiplier
Definition: ketypes.h:1130
ULONG ExAcqResSharedWaitForExclusiveAcquiresSharedRecursive
Definition: ketypes.h:718
ULONG64 CycleTimeBias
Definition: ketypes.h:916
UCHAR ImageDispatchEnable
Definition: ketypes.h:882
ULONG ApcInterruptRequest
Definition: ketypes.h:957
LIST_ENTRY ProfileListEntry
Definition: ketypes.h:808
ULONG64 WaitReasonBitMap
Definition: ketypes.h:912
ULONG StackCount
Definition: ketypes.h:1429
PVOID RangeLimit
Definition: ketypes.h:811
enum _KINTERRUPT_MODE KINTERRUPT_MODE
ULONG TickCountLowDeprecated
Definition: ketypes.h:1129
SINGLE_LIST_ENTRY ListHead
Definition: ketypes.h:678
enum _VDMSERVICECLASS VDMSERVICECLASS
LIST_ENTRY QueueListEntry
Definition: ketypes.h:1180
LIST_ENTRY ProcessListEntry
Definition: ketypes.h:1430
Definition: bufpool.h:45
PVOID KernelStack
Definition: ketypes.h:939
USHORT ImageNumberHigh
Definition: ketypes.h:1135
PVOID DeallocationStack
Definition: ketypes.h:185
ULONG GdiFlushActive
Definition: ketypes.h:955
struct DECLSPEC_ALIGN(16) _M128A
Definition: ketypes.h:900
KPROCESSOR_MODE Mode
Definition: ketypes.h:797
PVOID FlsData
Definition: ketypes.h:190
KTIMER Timer
Definition: ketypes.h:1060
ULONG DispatchCount
Definition: ketypes.h:850
LIST_ENTRY ThreadListHead
Definition: ketypes.h:1403
enum _KTHREAD_STATE KTHREAD_STATE
UCHAR DisableThunkEmulation
Definition: ketypes.h:879
LONG DisableQuantum
Definition: ketypes.h:1412
struct _KSYSTEM_TIME KSYSTEM_TIME
ULONG DpcCount
Definition: ketypes.h:748
CCHAR Number
Definition: ketypes.h:843
struct _LOADER_PARAMETER_BLOCK NTSYSAPI * KeLoaderBlock
Definition: krnlinit.c:29
#define MAX_WOW64_SHARED_ENTRIES
Definition: ketypes.h:1126
UCHAR PreviousMode
Definition: ketypes.h:1216
struct _KSYSTEM_TIME * PKSYSTEM_TIME
UCHAR WaitReason
Definition: ketypes.h:1249
ULARGE_INTEGER Time
Definition: ketypes.h:667
ULONG ExecutiveResourceAcquiresCount
Definition: ketypes.h:693
enum _EVENT_TYPE EVENT_TYPE
ULONG ExDeleteResourceCount
Definition: ketypes.h:692
USHORT ImageNumberLow
Definition: ketypes.h:1134
union _KWAIT_STATUS_REGISTER * PKWAIT_STATUS_REGISTER
_Out_ PULONG UserTime
Definition: kefuncs.h:784
struct _KNODE::_flags Flags
volatile KSYSTEM_TIME TickCount
Definition: ketypes.h:1198
ULONG DisableBoost
Definition: ketypes.h:1078
ULONG Alertable
Definition: ketypes.h:954
CCHAR SuspendCount
Definition: ketypes.h:1257
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:660
LIST_ENTRY InterruptListEntry
Definition: ketypes.h:827
int64_t LONGLONG
Definition: typedefs.h:66
SCHAR BasePriority
Definition: ketypes.h:1209
struct _FIBER * PFIBER
VOID(NTAPI * PTIMER_APC_ROUTINE)(_In_ PVOID TimerContext, _In_ ULONG TimerLowValue, _In_ LONG TimerHighValue)
Definition: ketypes.h:1081
KAFFINITY Affinity
Definition: ketypes.h:1405
int64_t LONG64
Definition: typedefs.h:66
unsigned char BOOLEAN
struct _KPROCESS KPROCESS
_In_ KPROCESSOR_MODE PreviousMode
Definition: sefuncs.h:103
ULONG NTSYSAPI KeMaximumIncrement
Definition: clock.c:20
UCHAR ApcStateFill[FIELD_OFFSET(KAPC_STATE, UserApcPending)+1]
Definition: ketypes.h:972
LIST_ENTRY Entry
Definition: ketypes.h:666
ULONG64 Start
Definition: ketypes.h:906
KIRQL Irql
Definition: ketypes.h:839
ULONG TebFlags
Definition: ketypes.h:192
ULONG KernelTime
Definition: ketypes.h:1305
ULONGLONG Rsvd1
Definition: ketypes.h:852
struct _THREAD_PERFORMANCE_DATA * UserData
Definition: ketypes.h:913
LONG High1Time
Definition: ketypes.h:896
SERVICE_TABLE_ENTRYW ServiceTable[]
Definition: service_main.c:23
ULONG MmShiftedColor
Definition: ketypes.h:784
enum _MODE MODE
#define PROCESSOR_FEATURE_MAX
ALTERNATIVE_ARCHITECTURE_TYPE AlternativeArchitecture
Definition: ketypes.h:1150
SINGLE_LIST_ENTRY SwapListEntry
Definition: ketypes.h:1401
volatile ULONG DeferredProcessor
Definition: ketypes.h:978
VOID(NTAPI * PKSYSTEM_ROUTINE)(PKSTART_ROUTINE StartRoutine, PVOID StartContext)
Definition: ketypes.h:625
char CCHAR
Definition: typedefs.h:50
ULONG ExAcqResExclusiveNotAcquires
Definition: ketypes.h:702
uint64_t ULONGLONG
Definition: typedefs.h:65
SINGLE_LIST_ENTRY SwapListEntry
Definition: ketypes.h:1042
struct _KUSER_SHARED_DATA KUSER_SHARED_DATA
UCHAR Visited
Definition: ketypes.h:1423
struct _KPROCESS * Process
Definition: ketypes.h:1232
BOOLEAN ShareVector
Definition: ketypes.h:844
PKTHREAD_COUNTERS ThreadCounters
Definition: ketypes.h:1365
ULONG DbgElevationEnabled
Definition: ketypes.h:1180
VOID(NTAPI * PKRUNDOWN_ROUTINE)(IN struct _KAPC *Apc)
Definition: ketypes.h:638
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:831
enum _WAIT_TYPE WAIT_TYPE
PKQUEUE Queue
Definition: ketypes.h:1044
KINTERRUPT_POLARITY Polarity
Definition: ketypes.h:847
VOID(NTAPI * PKNORMAL_ROUTINE)(IN PVOID NormalContext OPTIONAL, IN PVOID SystemArgument1 OPTIONAL, IN PVOID SystemArgument2 OPTIONAL)
Definition: ketypes.h:632
ULONG ExReInitializeResourceCount
Definition: ketypes.h:691
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
struct _PP_LOOKASIDE_LIST * PPP_LOOKASIDE_LIST
struct _FIBER FIBER
LIST_ENTRY WaitListEntry
Definition: ketypes.h:1041
#define LONG
Definition: msvc.h:36
UCHAR AdjustReason
Definition: ketypes.h:1213
struct _GENERAL_LOOKASIDE * L
Definition: ketypes.h:760
ULONG GuaranteedStackBytes
Definition: ketypes.h:191
ULONG NumberOfPhysicalPages
Definition: ketypes.h:1162
ULONGLONG CycleTime
Definition: ketypes.h:1432
ULONG QuantumEndMigrate
Definition: ketypes.h:959
enum _KINTERRUPT_POLARITY KINTERRUPT_POLARITY
enum _TIMER_TYPE TIMER_TYPE
ULONG ContextSwitches
Definition: ketypes.h:915
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _KTHREAD_COUNTERS KTHREAD_COUNTERS
ULONG Vector
Definition: ketypes.h:838
ULONG ExBoostExclusiveOwner
Definition: ketypes.h:726
COUNTER_READING HwCounter[16]
Definition: ketypes.h:918
PKSERVICE_ROUTINE ServiceRoutine
Definition: ketypes.h:828
UCHAR ThreadSeed
Definition: ketypes.h:1420
ULONGLONG QuantumTarget
Definition: ketypes.h:933
ULONG ExecutiveResourceConvertsCount
Definition: ketypes.h:697
_EVENT_TYPE
CSHORT Size
Definition: ketypes.h:807
PVOID NormalContext
Definition: ketypes.h:535
Definition: ketypes.h:672
UCHAR IdealNode
Definition: ketypes.h:1422
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:411
#define VOID
Definition: acefi.h:82
ULONG CycleChargePending
Definition: ketypes.h:1082
ULONG ExecutiveResourceContentionsCount
Definition: ketypes.h:694
Definition: ketypes.h:370
KEVENT LowEvent
Definition: ketypes.h:868
ULONG IdealProcessor
Definition: ketypes.h:1234
ULONG ExAcqResSharedWaitForExclusiveAcquiresExclusive
Definition: ketypes.h:716
Definition: ketypes.h:520
LIST_ENTRY ReadyListHead
Definition: ketypes.h:1400
_MODE
Definition: ketypes.h:10
_KAPC_ENVIRONMENT
Definition: ketypes.h:653
Definition: typedefs.h:117
volatile ULONG NextProcessor
Definition: ketypes.h:977
UCHAR NpxState
Definition: ketypes.h:998
ULONG SpinLockSpinCount
Definition: ketypes.h:686
ULONG ForceDeferSchedule
Definition: ketypes.h:958
struct _GETSETCONTEXT * PGETSETCONTEXT
struct _KTHREAD KTHREAD
ULONG PVOID Reserved
Definition: ntimage.h:533
volatile ULONG ActiveConsoleId
Definition: ketypes.h:1158
volatile KSYSTEM_TIME TimeZoneBias
Definition: ketypes.h:1133
ULONG ExAcqResSharedAcquiresSharedRecursive
Definition: ketypes.h:706
ULONG ReservedFlags
Definition: ketypes.h:1087
UCHAR Color
Definition: ketypes.h:777
ULONG IpiSendRequestRoutineCount
Definition: ketypes.h:688
KSPIN_LOCK ProcessLock
Definition: ketypes.h:1404
ULONG ExAcqResSharedStarveExclusiveAcquiresSharedRecursive
Definition: ketypes.h:712
struct _KTIMER_TABLE * PKTIMER_TABLE
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:660
LONG_PTR WaitStatus
Definition: ketypes.h:1002
CSHORT Type
Definition: ketypes.h:866
UCHAR QuantumReset
Definition: ketypes.h:1300
ULONG ExAcqResExclusiveAcquiresExclusive
Definition: ketypes.h:699
#define OPTIONAL
Definition: typedefs.h:40
#define _In_
Definition: no_sal2.h:204
PKSPIN_LOCK ActualLock
Definition: ketypes.h:836
PVOID StackBase
Definition: ketypes.h:1282
ULONG DispatchCode[DISPATCH_LENGTH]
Definition: ketypes.h:858
ULONG NTSYSAPI KeMinimumIncrement
Definition: clock.c:21
LONG High2Time
Definition: ketypes.h:897
ULONG EtwStackTraceApc1Inserted
Definition: ketypes.h:1080
Definition: compat.h:484
ULONG DbgVirtEnabled
Definition: ketypes.h:1181
volatile ULONG DpcQueueDepth
Definition: ketypes.h:746
ULONG ExTryToAcqExclusiveAcquires
Definition: ketypes.h:725
ULONG DbgInstallerDetectEnabled
Definition: ketypes.h:1182
ULONG SpinLockContentionCount
Definition: ketypes.h:685
enum State_ State
Definition: pofuncs.h:54
WCHAR NtSystemRoot[260]
Definition: ketypes.h:1136
ULONG_PTR Segment
Definition: ketypes.h:814
_NT_PRODUCT_TYPE
struct _GENERAL_LOOKASIDE * P
Definition: ketypes.h:759
CCHAR Spare1
Definition: ketypes.h:1259
ULONG CalloutActive
Definition: ketypes.h:1083
unsigned short USHORT
Definition: pedump.c:61
struct _SYNCH_COUNTERS * PSYNCH_COUNTERS
volatile ULONG64 TickCountQuad
Definition: ketypes.h:1199
ULONG_PTR KAFFINITY
Definition: compat.h:75
UCHAR Fill
Definition: ketypes.h:782
_HARDWARE_COUNTER_TYPE
Definition: pstypes.h:123
ULONG ExAcqResExclusiveWaits
Definition: ketypes.h:701
enum _ALTERNATIVE_ARCHITECTURE_TYPE ALTERNATIVE_ARCHITECTURE_TYPE
struct _KPROFILE * PKPROFILE
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
LIST_ENTRY ProfileListHead
Definition: ketypes.h:1381
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
ULONG SpinLockAcquireCount
Definition: ketypes.h:684
unsigned int * PULONG
Definition: retypes.h:1
ULONGLONG SystemCallPad[3]
Definition: ketypes.h:1196
CHAR AdjustIncrement
Definition: ketypes.h:1214
UCHAR NXSupportPolicy
Definition: ketypes.h:1156
ULONG ExInitializeResourceCount
Definition: ketypes.h:690
PVOID Wx86Tib
Definition: ketypes.h:188
KIRQL SynchronizeIrql
Definition: ketypes.h:840
ULONG KernelTime
Definition: ketypes.h:1398
LIST_ENTRY ThreadListEntry
Definition: ketypes.h:1351
ULONG LastSystemRITEventTickCount
Definition: ketypes.h:1161
UCHAR ExecuteEnable
Definition: ketypes.h:878
ULONG BucketShift
Definition: ketypes.h:812
enum _KTHREAD_STATE * PKTHREAD_STATE
ULONG UserTime
Definition: ketypes.h:1335
struct _KSERVICE_TABLE_DESCRIPTOR KSERVICE_TABLE_DESCRIPTOR
struct _KENTROPY_TIMING_STATE * PKENTROPY_TIMING_STATE
KEXECUTE_OPTIONS Flags
Definition: ketypes.h:1426
struct _COUNTER_READING COUNTER_READING
UCHAR ResourceIndex
Definition: ketypes.h:1290
ULONGLONG CycleTime
Definition: ketypes.h:929
DISPATCHER_HEADER Header
Definition: ketypes.h:927
#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
enum _KWAIT_REASON KWAIT_REASON
_ADJUST_REASON
Definition: ketypes.h:418
PVOID LegoData
Definition: ketypes.h:1319
BOOLEAN Running
Definition: ketypes.h:943
#define OUT
Definition: typedefs.h:39
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:997
ULONG SListFaultCount
Definition: ketypes.h:1349
PVOID Win32Thread
Definition: ketypes.h:1281
GROUP_AFFINITY Affinity
Definition: ketypes.h:1233
CSHORT Size
Definition: ketypes.h:826
_KTHREAD_STATE
Definition: ketypes.h:367
struct _KINTERRUPT KINTERRUPT
unsigned int ULONG
Definition: retypes.h:1
ULONG NTSYSAPI KeDcacheFlushCount
Definition: cpu.c:20
ULONG ContextSwitches
Definition: ketypes.h:996
_In_ PLARGE_INTEGER _In_opt_ PTIMER_APC_ROUTINE _In_opt_ PVOID TimerContext
Definition: zwfuncs.h:428
uint32_t * PULONG_PTR
Definition: typedefs.h:63
UCHAR PowerState
Definition: ketypes.h:1421
UCHAR NodeNumber
Definition: ketypes.h:779
struct _KEXECUTE_OPTIONS * PKEXECUTE_OPTIONS
ULONG WaitTime
Definition: ketypes.h:1046
ULONG ReadyTransition
Definition: ketypes.h:950
ULONG IpiSendSoftwareInterruptCount
Definition: ketypes.h:689
UCHAR ApcStateIndex
Definition: ketypes.h:1198
SLIST_HEADER PfnDereferenceSListHead
Definition: ketypes.h:775
struct _KDPC_LIST * PKDPC_LIST
struct _KWAIT_BLOCK KWAIT_BLOCK
KAFFINITY ProcessorMask
Definition: ketypes.h:776
ULONG Unused0
Definition: ketypes.h:1384
ULONG ApcQueueable
Definition: ketypes.h:1084
ULONG KernelStackResident
Definition: ketypes.h:949
KPROCESSOR_MODE WaitMode
Definition: ketypes.h:1000
PKDPC ActiveDpc
Definition: ketypes.h:750
UCHAR Seed
Definition: ketypes.h:778
KEVENT HighEvent
Definition: ketypes.h:869
ULONG ExAcqResSharedWaitForExclusiveWaits
Definition: ketypes.h:719
enum _KPROFILE_SOURCE KPROFILE_SOURCE
enum _HARDWARE_COUNTER_TYPE Type
Definition: ketypes.h:904
ULONG UserTime
Definition: ketypes.h:1399
LONG AutoAlignment
Definition: ketypes.h:1410
PKINTERRUPT_ROUTINE DispatchAddress
Definition: ketypes.h:837
UCHAR ExecuteDispatchEnable
Definition: ketypes.h:881
short CSHORT
Definition: umtypes.h:115
_WAIT_TYPE
PVOID InitialStack
Definition: ketypes.h:937
ULONG DbgErrorPortPresent
Definition: ketypes.h:1179
enum _ADJUST_REASON ADJUST_REASON
struct _KPROFILE KPROFILE
struct _KTIMER_TABLE_ENTRY KTIMER_TABLE_ENTRY
PVOID ServiceContext
Definition: ketypes.h:833
GROUP_AFFINITY UserAffinity
Definition: ketypes.h:1231
ULONG_PTR NTSYSAPI KiBugCheckData[]
Definition: bug.c:30
KAPC SuspendApc
Definition: ketypes.h:1285
struct _KNODE * PKNODE
KSPIN_LOCK ThreadLock
Definition: ketypes.h:940
_In_ LONG _In_ LONG Limit
Definition: kefuncs.h:328
ULONG FreeCount[2]
Definition: ketypes.h:785
KWAIT_STATUS_REGISTER WaitRegister
Definition: ketypes.h:942
ULONG GuiThread
Definition: ketypes.h:1086
PVOID VdmTrapcHandler
Definition: ketypes.h:1402
ULONG SystemCallNumber
Definition: ketypes.h:1223
ULONG ExAcqResSharedWaitForExclusiveNotAcquires
Definition: ketypes.h:720
ULONG ExecutiveResourceReleaseExclusiveCount
Definition: ketypes.h:695
struct _ACTIVATION_CONTEXT_STACK * ActivationContextStackPointer
Definition: ketypes.h:189
* PKAPC_STATE
Definition: ketypes.h:1258
ULONG ComPlusPackage
Definition: ketypes.h:1160
#define THREAD_WAIT_OBJECTS
Definition: ketypes.h:465
BOOLEAN ProcessorFeatures[PROCESSOR_FEATURE_MAX]
Definition: ketypes.h:1146
struct _KSERVICE_TABLE_DESCRIPTOR * PKSERVICE_TABLE_DESCRIPTOR
_KCONTINUE_STATUS
Definition: ketypes.h:428
DISPATCHER_HEADER Header
Definition: ketypes.h:1380
_KPROFILE_SOURCE
Definition: winternl.h:2073
LIST_ENTRY MutantListHead
Definition: ketypes.h:1353
ULONG ExEtwSynchTrackingNotificationsAccountedCount
Definition: ketypes.h:729
volatile ULONG DismountCount
Definition: ketypes.h:1159
KIRQL WaitIrql
Definition: ketypes.h:999
BOOLEAN ProductTypeIsValid
Definition: ketypes.h:1143
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:642
ULONG Wow64SharedInformation[MAX_WOW64_SHARED_ENTRIES]
Definition: ketypes.h:1209
struct _KNODE KNODE
struct _PP_LOOKASIDE_LIST PP_LOOKASIDE_LIST
KSERVICE_TABLE_DESCRIPTOR NTSYSAPI KeServiceDescriptorTableShadow[SSDT_MAX_ENTRIES]
Definition: procobj.c:24