ReactOS 0.4.15-dev-7934-g1dc8d80
extypes.h
Go to the documentation of this file.
2/******************************************************************************
3 * Executive Types *
4 ******************************************************************************/
7#define EX_RUNDOWN_ACTIVE 0x1
8#define EX_RUNDOWN_COUNT_SHIFT 0x1
9#define EX_RUNDOWN_COUNT_INC (1 << EX_RUNDOWN_COUNT_SHIFT)
10
11typedef struct _FAST_MUTEX {
12 volatile LONG Count;
14 ULONG Contention;
18
19typedef enum _SUITE_TYPE {
38
39typedef enum _EX_POOL_PRIORITY {
50
51#if !defined(_WIN64) && (defined(_NTDDK_) || defined(_NTIFS_) || defined(_NDIS_))
52#define LOOKASIDE_ALIGN
53#else
54#define LOOKASIDE_ALIGN DECLSPEC_CACHEALIGN
55#endif
56
58
60_Function_class_(ALLOCATE_FUNCTION)
61typedef PVOID
62(NTAPI *PALLOCATE_FUNCTION)(
66
68_Function_class_(ALLOCATE_FUNCTION_EX)
69typedef PVOID
70(NTAPI *PALLOCATE_FUNCTION_EX)(
75
77_Function_class_(FREE_FUNCTION)
78typedef VOID
79(NTAPI *PFREE_FUNCTION)(
81
83_Function_class_(FREE_FUNCTION_EX)
84typedef VOID
85(NTAPI *PFREE_FUNCTION_EX)(
88
91typedef VOID
97
98#define GENERAL_LOOKASIDE_LAYOUT \
99 _ANONYMOUS_UNION union { \
100 SLIST_HEADER ListHead; \
101 SINGLE_LIST_ENTRY SingleListHead; \
102 } DUMMYUNIONNAME; \
103 USHORT Depth; \
104 USHORT MaximumDepth; \
105 ULONG TotalAllocates; \
106 _ANONYMOUS_UNION union { \
107 ULONG AllocateMisses; \
108 ULONG AllocateHits; \
109 } DUMMYUNIONNAME2; \
110 ULONG TotalFrees; \
111 _ANONYMOUS_UNION union { \
112 ULONG FreeMisses; \
113 ULONG FreeHits; \
114 } DUMMYUNIONNAME3; \
115 POOL_TYPE Type; \
116 ULONG Tag; \
117 ULONG Size; \
118 _ANONYMOUS_UNION union { \
119 PALLOCATE_FUNCTION_EX AllocateEx; \
120 PALLOCATE_FUNCTION Allocate; \
121 } DUMMYUNIONNAME4; \
122 _ANONYMOUS_UNION union { \
123 PFREE_FUNCTION_EX FreeEx; \
124 PFREE_FUNCTION Free; \
125 } DUMMYUNIONNAME5; \
126 LIST_ENTRY ListEntry; \
127 ULONG LastTotalAllocates; \
128 _ANONYMOUS_UNION union { \
129 ULONG LastAllocateMisses; \
130 ULONG LastAllocateHits; \
131 } DUMMYUNIONNAME6; \
132 ULONG Future[2];
133
137
141
142#define LOOKASIDE_CHECK(f) \
143 C_ASSERT(FIELD_OFFSET(GENERAL_LOOKASIDE,f) == FIELD_OFFSET(GENERAL_LOOKASIDE_POOL,f))
144
148
151#if !defined(_AMD64_) && !defined(_IA64_)
153#endif
155
158#if !defined(_AMD64_) && !defined(_IA64_)
160#endif
162
163#define LOOKASIDE_MINIMUM_BLOCK_SIZE (RTL_SIZEOF_THROUGH_FIELD (SLIST_ENTRY, Next))
164
165typedef struct _LOOKASIDE_LIST_EX {
168
169#if (NTDDI_VERSION >= NTDDI_VISTA)
170
171#define EX_LOOKASIDE_LIST_EX_FLAGS_RAISE_ON_FAIL 0x00000001UL
172#define EX_LOOKASIDE_LIST_EX_FLAGS_FAIL_NO_RAISE 0x00000002UL
173
174#define EX_MAXIMUM_LOOKASIDE_DEPTH_BASE 256
175#define EX_MAXIMUM_LOOKASIDE_DEPTH_LIMIT 1024
176
177#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
178
179typedef struct _EX_RUNDOWN_REF {
180 _ANONYMOUS_UNION union {
181 volatile ULONG_PTR Count;
182 volatile PVOID Ptr;
185
187
188typedef enum _WORK_QUEUE_TYPE {
194
196_Function_class_(WORKER_THREAD_ROUTINE)
197typedef VOID
198(NTAPI WORKER_THREAD_ROUTINE)(
200typedef WORKER_THREAD_ROUTINE *PWORKER_THREAD_ROUTINE;
201
202typedef struct _WORK_QUEUE_ITEM {
205 volatile PVOID Parameter;
207
209
210typedef struct _OWNER_ENTRY {
212 _ANONYMOUS_UNION union {
213 _ANONYMOUS_STRUCT struct {
221
222typedef struct _ERESOURCE {
234#if defined(_WIN64)
236#endif
237 _ANONYMOUS_UNION union {
243
244/* ERESOURCE.Flag */
245#define ResourceNeverExclusive 0x0010
246#define ResourceReleaseByOtherThread 0x0020
247#define ResourceOwnedExclusive 0x0080
248
249#define RESOURCE_HASH_TABLE_SIZE 64
250
251typedef struct _RESOURCE_HASH_ENTRY {
257
271
272/* Global debug flag */
273#if DEVL
275#define IF_NTOS_DEBUG(FlagName) if (NtGlobalFlag & (FLG_##FlagName))
276#else
277#define IF_NTOS_DEBUG(FlagName) if(FALSE)
278#endif
279
280#if (NTDDI_VERSION >= NTDDI_WINBLUE)
281
283{
288
290
291typedef struct _EX_TIMER *PEX_TIMER;
292
293_Function_class_(EXT_CALLBACK)
296typedef
297VOID
298NTAPI
299EXT_CALLBACK(
302
303typedef EXT_CALLBACK *PEXT_CALLBACK;
304
305_Function_class_(EXT_DELETE_CALLBACK)
308typedef
309VOID
310NTAPI
311EXT_DELETE_CALLBACK(
313
314typedef EXT_DELETE_CALLBACK *PEXT_DELETE_CALLBACK;
317{
323
324#endif // NTDDI_WINBLUE
325
327$if (_NTDDK_)
328typedef struct _ZONE_SEGMENT_HEADER {
329 SINGLE_LIST_ENTRY SegmentList;
332
333typedef struct _ZONE_HEADER {
339
340#define PROTECTED_POOL 0x80000000
341
343$if (_NTIFS_)
344#define INVALID_PROCESSOR_INDEX 0xffffffff
345
346#define EX_PUSH_LOCK ULONG_PTR
347#define PEX_PUSH_LOCK PULONG_PTR
349
351#if (NTDDI_VERSION >= NTDDI_VISTA)
352typedef enum _FIRMWARE_TYPE {
358#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
_FIRMWARE_TYPE
Definition: UEFIFirmware.c:25
@ FirmwareTypeUnknown
Definition: UEFIFirmware.c:26
@ FirmwareTypeUefi
Definition: UEFIFirmware.c:28
@ FirmwareTypeBios
Definition: UEFIFirmware.c:27
@ FirmwareTypeMax
Definition: UEFIFirmware.c:29
#define VOID
Definition: acefi.h:82
@ Reserved2
Definition: bcd.h:202
Definition: bufpool.h:45
LONG TotalFrees
Definition: memory.c:15
#define _IRQL_requires_same_
Definition: driverspecs.h:232
#define _IRQL_requires_(irql)
Definition: driverspecs.h:229
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _NTIFS_
Definition: ifssupp.h:20
#define CALLBACK_FUNCTION
Definition: mmsystem.h:150
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
_Out_writes_bytes_to_opt_ AbsoluteSecurityDescriptorSize PSECURITY_DESCRIPTOR _Inout_ PULONG _Out_writes_bytes_to_opt_ DaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ SaclSize PACL _Inout_ PULONG _Out_writes_bytes_to_opt_ OwnerSize PSID Owner
Definition: rtlfuncs.h:1597
int Count
Definition: noreturn.cpp:7
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
#define _ANONYMOUS_STRUCT
Definition: ntbasedef.h:56
#define _NTDDK_
ULONG NtGlobalFlag
Definition: init.c:54
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
Definition: hash.c:67
PVOID Address
Definition: extypes.h:238
_ANONYMOUS_UNION union _ERESOURCE::@3957 DUMMYUNIONNAME
volatile PKSEMAPHORE SharedWaiters
Definition: extypes.h:227
ULONG NumberOfExclusiveWaiters
Definition: extypes.h:233
volatile PKEVENT ExclusiveWaiters
Definition: extypes.h:228
ULONG NumberOfSharedWaiters
Definition: extypes.h:232
LIST_ENTRY SystemResourcesList
Definition: extypes.h:223
ULONG ContentionCount
Definition: extypes.h:231
KSPIN_LOCK SpinLock
Definition: extypes.h:241
USHORT Flag
Definition: extypes.h:226
OWNER_ENTRY OwnerEntry
Definition: extypes.h:229
POWNER_ENTRY OwnerTable
Definition: extypes.h:224
SHORT ActiveCount
Definition: extypes.h:225
ULONG ActiveEntries
Definition: extypes.h:230
ULONG_PTR CreatorBackTraceIndex
Definition: extypes.h:239
PEXT_DELETE_CALLBACK DeleteCallback
Definition: extypes.h:320
LONGLONG NoWakeTolerance
Definition: extypes.h:286
volatile PVOID Ptr
Definition: extypes.h:182
_ANONYMOUS_UNION union _EX_RUNDOWN_REF::@3954 DUMMYUNIONNAME
volatile ULONG_PTR Count
Definition: extypes.h:181
Definition: typedefs.h:120
GENERAL_LOOKASIDE_POOL L
Definition: extypes.h:166
KSPIN_LOCK Lock__ObsoleteButDoNotDelete
Definition: extypes.h:159
GENERAL_LOOKASIDE L
Definition: extypes.h:157
Definition: extypes.h:210
_ANONYMOUS_UNION union _OWNER_ENTRY::@3955 DUMMYUNIONNAME
ULONG OwnerCount
Definition: extypes.h:216
_ANONYMOUS_STRUCT struct _OWNER_ENTRY::@3955::@3956 DUMMYSTRUCTNAME
ULONG TableSize
Definition: extypes.h:218
ERESOURCE_THREAD OwnerThread
Definition: extypes.h:211
ULONG IoPriorityBoosted
Definition: extypes.h:214
ULONG OwnerReferenced
Definition: extypes.h:215
GENERAL_LOOKASIDE L
Definition: extypes.h:150
FAST_MUTEX Lock__ObsoleteButDoNotDelete
Definition: extypes.h:152
Definition: extypes.h:251
ULONG Number
Definition: extypes.h:255
PVOID Address
Definition: extypes.h:253
LIST_ENTRY ListEntry
Definition: extypes.h:252
ULONG ContentionCount
Definition: extypes.h:254
Definition: ntbasedef.h:628
volatile PVOID Parameter
Definition: extypes.h:205
LIST_ENTRY List
Definition: extypes.h:203
PWORKER_THREAD_ROUTINE WorkerRoutine
Definition: extypes.h:204
ULONG TotalSegmentSize
Definition: extypes.h:337
ULONG BlockSize
Definition: extypes.h:336
SINGLE_LIST_ENTRY SegmentList
Definition: extypes.h:335
SINGLE_LIST_ENTRY FreeList
Definition: extypes.h:334
INT POOL_TYPE
Definition: typedefs.h:78
int64_t LONGLONG
Definition: typedefs.h:68
#define NTAPI
Definition: typedefs.h:36
void * PVOID
Definition: typedefs.h:50
ULONG_PTR SIZE_T
Definition: typedefs.h:80
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
Definition: wdfdevice.h:4065
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
Definition: wdfdevice.h:3815
#define _WDMDDK_
Definition: wdm.template.h:26
#define NTKERNELAPI
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define _WINNT_
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR _In_ ULONGLONG _In_ ULONGLONG _In_opt_ PEVENT_FILTER_DESCRIPTOR _Inout_opt_ PVOID CallbackContext
Definition: wmitypes.h:60
* PFIRMWARE_TYPE
Definition: extypes.h:357
struct _EX_TIMER * PEX_TIMER
Definition: extypes.h:291
_SUITE_TYPE
Definition: extypes.h:19
@ DataCenter
Definition: extypes.h:27
@ CommunicationServer
Definition: extypes.h:23
@ Blade
Definition: extypes.h:30
@ SingleUserTS
Definition: extypes.h:28
@ WHServer
Definition: extypes.h:35
@ SmallBusiness
Definition: extypes.h:20
@ SmallBusinessRestricted
Definition: extypes.h:25
@ ComputeServer
Definition: extypes.h:34
@ TerminalServer
Definition: extypes.h:24
@ BackOffice
Definition: extypes.h:22
@ Enterprise
Definition: extypes.h:21
@ Personal
Definition: extypes.h:29
@ EmbeddedNT
Definition: extypes.h:26
@ MaxSuiteType
Definition: extypes.h:36
@ SecurityAppliance
Definition: extypes.h:32
@ StorageServer
Definition: extypes.h:33
@ EmbeddedRestricted
Definition: extypes.h:31
CALLBACK_FUNCTION * PCALLBACK_FUNCTION
Definition: extypes.h:96
* PZONE_SEGMENT_HEADER
Definition: extypes.h:331
struct _EX_RUNDOWN_REF * PEX_RUNDOWN_REF
struct _EX_RUNDOWN_REF_CACHE_AWARE * PEX_RUNDOWN_REF_CACHE_AWARE
Definition: extypes.h:186
struct _EXT_SET_PARAMETERS_V0 EXT_SET_PARAMETERS
struct _GENERAL_LOOKASIDE_POOL GENERAL_LOOKASIDE_POOL
struct _RESOURCE_HASH_ENTRY * PRESOURCE_HASH_ENTRY
struct _LOOKASIDE_LIST_EX * PLOOKASIDE_LIST_EX
Definition: extypes.h:57
EXT_SET_PARAMETERS * PKT2_SET_PARAMETERS
Definition: extypes.h:289
_IRQL_requires_same_ _In_ SIZE_T _In_ ULONG Tag
Definition: extypes.h:65
struct _EXT_SET_PARAMETERS_V0 * PEXT_SET_PARAMETERS
struct _RESOURCE_HASH_ENTRY RESOURCE_HASH_ENTRY
$if(_WDMDDK_||_NTDDK_) $endif(_WDMDDK_||_NTDDK_) $if(_WDMDDK_) typedef struct _FAST_MUTEX
Definition: extypes.h:1
struct _ERESOURCE * PERESOURCE
ULONG_PTR * PERESOURCE_THREAD
Definition: extypes.h:208
EXT_CALLBACK * PEXT_CALLBACK
Definition: extypes.h:303
EXT_DELETE_CALLBACK * PEXT_DELETE_CALLBACK
Definition: extypes.h:314
#define GENERAL_LOOKASIDE_LAYOUT
Definition: extypes.h:98
#define LOOKASIDE_ALIGN
Definition: extypes.h:54
_IRQL_requires_same_ _In_ SIZE_T _In_ ULONG _Inout_ PLOOKASIDE_LIST_EX Lookaside
Definition: extypes.h:74
struct _GENERAL_LOOKASIDE_POOL * PGENERAL_LOOKASIDE_POOL
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _ZONE_SEGMENT_HEADER
Definition: extypes.h:326
* PFAST_MUTEX
Definition: extypes.h:17
struct _OWNER_ENTRY * POWNER_ENTRY
enum _WORK_QUEUE_TYPE WORK_QUEUE_TYPE
struct _LOOKASIDE_LIST_EX LOOKASIDE_LIST_EX
EXT_SET_PARAMETERS KT2_SET_PARAMETERS
Definition: extypes.h:289
_EX_POOL_PRIORITY
Definition: extypes.h:39
@ LowPoolPrioritySpecialPoolOverrun
Definition: extypes.h:41
@ HighPoolPriority
Definition: extypes.h:46
@ NormalPoolPriority
Definition: extypes.h:43
@ NormalPoolPrioritySpecialPoolOverrun
Definition: extypes.h:44
@ NormalPoolPrioritySpecialPoolUnderrun
Definition: extypes.h:45
@ LowPoolPrioritySpecialPoolUnderrun
Definition: extypes.h:42
@ HighPoolPrioritySpecialPoolUnderrun
Definition: extypes.h:48
@ LowPoolPriority
Definition: extypes.h:40
@ HighPoolPrioritySpecialPoolOverrun
Definition: extypes.h:47
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE GENERAL_LOOKASIDE
FAST_MUTEX
Definition: extypes.h:17
struct _EXT_DELETE_PARAMETERS EXT_DELETE_PARAMETERS
#define RESOURCE_HASH_TABLE_SIZE
Definition: extypes.h:249
ZONE_SEGMENT_HEADER
Definition: extypes.h:331
_WORK_QUEUE_TYPE
Definition: extypes.h:188
@ DelayedWorkQueue
Definition: extypes.h:190
@ CriticalWorkQueue
Definition: extypes.h:189
@ HyperCriticalWorkQueue
Definition: extypes.h:191
@ MaximumWorkQueue
Definition: extypes.h:192
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST PAGED_LOOKASIDE_LIST
struct _EX_RUNDOWN_REF EX_RUNDOWN_REF
struct _OWNER_ENTRY OWNER_ENTRY
struct _ZONE_HEADER * PZONE_HEADER
PVOID PEXT_CANCEL_PARAMETERS
Definition: extypes.h:315
#define LOOKASIDE_CHECK(f)
Definition: extypes.h:142
struct _WORK_QUEUE_ITEM * PWORK_QUEUE_ITEM
WORKER_THREAD_ROUTINE * PWORKER_THREAD_ROUTINE
Definition: extypes.h:200
_IRQL_requires_same_ _In_ SIZE_T NumberOfBytes
Definition: extypes.h:64
struct _RESOURCE_PERFORMANCE_DATA RESOURCE_PERFORMANCE_DATA
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: extypes.h:94
struct LOOKASIDE_ALIGN _GENERAL_LOOKASIDE * PGENERAL_LOOKASIDE
struct _ERESOURCE ERESOURCE
enum _EX_POOL_PRIORITY EX_POOL_PRIORITY
struct _RESOURCE_PERFORMANCE_DATA * PRESOURCE_PERFORMANCE_DATA
FIRMWARE_TYPE
Definition: extypes.h:357
struct _EXT_DELETE_PARAMETERS * PEXT_DELETE_PARAMETERS
_IRQL_requires_same_ _In_opt_ PVOID _In_opt_ PVOID Argument2
Definition: extypes.h:95
struct _ZONE_HEADER ZONE_HEADER
struct _WORK_QUEUE_ITEM WORK_QUEUE_ITEM
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
enum _SUITE_TYPE SUITE_TYPE
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST * PNPAGED_LOOKASIDE_LIST
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST * PPAGED_LOOKASIDE_LIST
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323