ReactOS 0.4.15-dev-7788-g1ad9096
exfuncs.h
Go to the documentation of this file.
1/******************************************************************************
2 * Executive Functions *
3 ******************************************************************************/
4
6#define ExInterlockedIncrementLong(Addend,Lock) Exfi386InterlockedIncrementLong(Addend)
7#define ExInterlockedDecrementLong(Addend,Lock) Exfi386InterlockedDecrementLong(Addend)
8#define ExInterlockedExchangeUlong(Target, Value, Lock) Exfi386InterlockedExchangeUlong(Target, Value)
9
10#define ExAcquireSpinLock(Lock, OldIrql) KeAcquireSpinLock((Lock), (OldIrql))
11#define ExReleaseSpinLock(Lock, OldIrql) KeReleaseSpinLock((Lock), (OldIrql))
12#define ExAcquireSpinLockAtDpcLevel(Lock) KeAcquireSpinLockAtDpcLevel(Lock)
13#define ExReleaseSpinLockFromDpcLevel(Lock) KeReleaseSpinLockFromDpcLevel(Lock)
14
15#define ExInitializeSListHead InitializeSListHead
16
17#if defined(_NTHAL_) && defined(_X86_)
18
20VOID
22ExiAcquireFastMutex(
23 IN OUT PFAST_MUTEX FastMutex);
24
26VOID
28ExiReleaseFastMutex(
29 IN OUT PFAST_MUTEX FastMutex);
30
34ExiTryToAcquireFastMutex(
35 IN OUT PFAST_MUTEX FastMutex);
36
37#define ExAcquireFastMutex ExiAcquireFastMutex
38#define ExReleaseFastMutex ExiReleaseFastMutex
39#define ExTryToAcquireFastMutex ExiTryToAcquireFastMutex
40
41#else
42
43#if (NTDDI_VERSION >= NTDDI_WIN2K)
44
48VOID
52 PFAST_MUTEX FastMutex);
53
57VOID
61 PFAST_MUTEX FastMutex);
62
72 PFAST_MUTEX FastMutex);
73
74#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
75
76#endif /* defined(_NTHAL_) && defined(_X86_) */
77
78#if defined(_X86_)
79#define ExInterlockedAddUlong ExfInterlockedAddUlong
80#define ExInterlockedInsertHeadList ExfInterlockedInsertHeadList
81#define ExInterlockedInsertTailList ExfInterlockedInsertTailList
82#define ExInterlockedRemoveHeadList ExfInterlockedRemoveHeadList
83#define ExInterlockedPopEntryList ExfInterlockedPopEntryList
84#define ExInterlockedPushEntryList ExfInterlockedPushEntryList
85#endif /* defined(_X86_) */
86
87#ifdef _X86_
88
89#ifdef _WIN2K_COMPAT_SLIST_USAGE
90
95 _Inout_ PSLIST_HEADER SListHead,
98
103 _Inout_ PSLIST_HEADER SListHead,
105
106#else /* !_WIN2K_COMPAT_SLIST_USAGE */
107
108#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock) \
109 InterlockedPushEntrySList(SListHead, SListEntry)
110
111#define ExInterlockedPopEntrySList(SListHead, Lock) \
112 InterlockedPopEntrySList(SListHead)
113
114#endif /* _WIN2K_COMPAT_SLIST_USAGE */
115
120 _Inout_ PSLIST_HEADER SListHead);
121
122#ifdef NONAMELESSUNION
123#define ExQueryDepthSList(SListHead) (SListHead)->s.Depth
124#else
125#define ExQueryDepthSList(SListHead) (SListHead)->Depth
126#endif
127
128#else /* !_X86_ */
129
133 _Inout_ PSLIST_HEADER SListHead,
135
139 _Inout_ PSLIST_HEADER SListHead);
140
144 _Inout_ PSLIST_HEADER SListHead);
145
146#if !defined(_NTSYSTEM_) && (defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_NTOSP_))
148USHORT
150#else
152USHORT
154{
155#ifdef _WIN64
156 return (USHORT)(SListHead->Alignment & 0xffff);
157#else /* !_WIN64 */
158 return (USHORT)SListHead->Depth;
159#endif /* _WIN64 */
160}
161#endif
162
163#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock) \
164 ExpInterlockedPushEntrySList(SListHead, SListEntry)
165
166#define ExInterlockedPopEntrySList(SListHead, Lock) \
167 ExpInterlockedPopEntrySList(SListHead)
168
169#define ExInterlockedFlushSList(SListHead) \
170 ExpInterlockedFlushSList(SListHead)
171
172#endif /* _X86_ */
173
174
175#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
176
179PVOID
180NTAPI
181ExAllocateFromPagedLookasideList(
183
186VOID
187NTAPI
188ExFreeToPagedLookasideList(
191
192#else /* !_WIN2K_COMPAT_SLIST_USAGE */
193
195static __inline
196PVOID
197ExAllocateFromPagedLookasideList(
199{
200 PVOID Entry;
201
202 Lookaside->L.TotalAllocates++;
203#ifdef NONAMELESSUNION
204 Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
205 if (Entry == NULL) {
206 Lookaside->L.u2.AllocateMisses++;
207 Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
208 Lookaside->L.Size,
209 Lookaside->L.Tag);
210 }
211#else /* NONAMELESSUNION */
213 if (Entry == NULL) {
214 Lookaside->L.AllocateMisses++;
215 Entry = (Lookaside->L.Allocate)(Lookaside->L.Type,
216 Lookaside->L.Size,
217 Lookaside->L.Tag);
218 }
219#endif /* NONAMELESSUNION */
220 return Entry;
221}
222
224static __inline
225VOID
226ExFreeToPagedLookasideList(
229{
230 Lookaside->L.TotalFrees++;
231#ifdef NONAMELESSUNION
232 if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
233 Lookaside->L.u3.FreeMisses++;
234 (Lookaside->L.u5.Free)(Entry);
235 } else {
237 }
238#else /* NONAMELESSUNION */
239 if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
240 Lookaside->L.FreeMisses++;
241 (Lookaside->L.Free)(Entry);
242 } else {
244 }
245#endif /* NONAMELESSUNION */
246}
247
248#endif /* _WIN2K_COMPAT_SLIST_USAGE */
249
250
251/* ERESOURCE_THREAD
252 * ExGetCurrentResourceThread(
253 * VOID);
254 */
255#define ExGetCurrentResourceThread() ((ULONG_PTR)PsGetCurrentThread())
256
257#define ExReleaseResource(R) (ExReleaseResourceLite(R))
258
259/* VOID
260 * ExInitializeWorkItem(
261 * IN PWORK_QUEUE_ITEM Item,
262 * IN PWORKER_THREAD_ROUTINE Routine,
263 * IN PVOID Context)
264 */
265#define ExInitializeWorkItem(Item, Routine, Context) \
266{ \
267 (Item)->WorkerRoutine = Routine; \
268 (Item)->Parameter = Context; \
269 (Item)->List.Flink = NULL; \
270}
271
273VOID
275 _Out_ PFAST_MUTEX FastMutex)
276{
277 FastMutex->Count = FM_LOCK_BIT;
278 FastMutex->Owner = NULL;
279 FastMutex->Contention = 0;
280 KeInitializeEvent(&FastMutex->Event, SynchronizationEvent, FALSE);
281 return;
282}
283
285$if (_NTDDK_)
286static __inline PVOID
287ExAllocateFromZone(
288 IN PZONE_HEADER Zone)
289{
290 PVOID Result = (PVOID)Zone->FreeList.Next;
291 if (Zone->FreeList.Next)
292 Zone->FreeList.Next = Zone->FreeList.Next->Next;
293 return Result;
294}
295
296static __inline PVOID
298 IN PZONE_HEADER Zone,
299 IN PVOID Block)
300{
301 ((PSINGLE_LIST_ENTRY) Block)->Next = Zone->FreeList.Next;
302 Zone->FreeList.Next = ((PSINGLE_LIST_ENTRY) Block);
303 return ((PSINGLE_LIST_ENTRY) Block)->Next;
304}
305
306/*
307 * PVOID
308 * ExInterlockedAllocateFromZone(
309 * IN PZONE_HEADER Zone,
310 * IN PKSPIN_LOCK Lock)
311 */
312#define ExInterlockedAllocateFromZone(Zone, Lock) \
313 ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock))
314
315/* PVOID
316 * ExInterlockedFreeToZone(
317 * IN PZONE_HEADER Zone,
318 * IN PVOID Block,
319 * IN PKSPIN_LOCK Lock);
320 */
321#define ExInterlockedFreeToZone(Zone, Block, Lock) \
322 ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock)
323
324/*
325 * BOOLEAN
326 * ExIsFullZone(
327 * IN PZONE_HEADER Zone)
328 */
329#define ExIsFullZone(Zone) \
330 ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL)
331
332/* BOOLEAN
333 * ExIsObjectInFirstZoneSegment(
334 * IN PZONE_HEADER Zone,
335 * IN PVOID Object);
336 */
337#define ExIsObjectInFirstZoneSegment(Zone,Object) \
338 ((BOOLEAN)( ((PUCHAR)(Object) >= (PUCHAR)(Zone)->SegmentList.Next) && \
339 ((PUCHAR)(Object) < (PUCHAR)(Zone)->SegmentList.Next + \
340 (Zone)->TotalSegmentSize)) )
341
342#define ExAcquireResourceExclusive ExAcquireResourceExclusiveLite
343#define ExAcquireResourceShared ExAcquireResourceSharedLite
344#define ExConvertExclusiveToShared ExConvertExclusiveToSharedLite
345#define ExDeleteResource ExDeleteResourceLite
346#define ExInitializeResource ExInitializeResourceLite
347#define ExIsResourceAcquiredExclusive ExIsResourceAcquiredExclusiveLite
348#define ExIsResourceAcquiredShared ExIsResourceAcquiredSharedLite
349#define ExIsResourceAcquired ExIsResourceAcquiredSharedLite
350#define ExReleaseResourceForThread ExReleaseResourceForThreadLite
351
352#ifndef _M_IX86
353#define RESULT_ZERO 0
354#define RESULT_NEGATIVE 1
355#define RESULT_POSITIVE 2
356#endif
357
363
364#ifdef _X86_
365
369Exfi386InterlockedIncrementLong(
371
375Exfi386InterlockedDecrementLong(
377
379ULONG
381Exfi386InterlockedExchangeUlong(
384
385#endif
386
388$if (_NTIFS_)
389
390#define ExDisableResourceBoost ExDisableResourceBoostLite
391
392VOID
393NTAPI
395 _Out_ PEX_PUSH_LOCK PushLock);
397
398#if (NTDDI_VERSION >= NTDDI_WIN2K)
401_Requires_lock_held_(_Global_critical_region_)
403VOID
407 PFAST_MUTEX FastMutex);
408
410_Requires_lock_held_(_Global_critical_region_)
412VOID
416 PFAST_MUTEX FastMutex);
417
418_Requires_lock_held_(_Global_critical_region_)
426NTAPI
430
432_Requires_lock_held_(_Global_critical_region_)
437NTAPI
443
445_Requires_lock_held_(_Global_critical_region_)
450NTAPI
456
458_Requires_lock_held_(_Global_critical_region_)
463NTAPI
466 _When_(return!=0, _Acquires_lock_(*_Curr_))
469
471 "No tag interferes with debugging.")
476 __drv_reportError("Must succeed pool allocations are forbidden. "
477 "Allocation failures cause a system crash"))
486PVOID
487NTAPI
491
493 "No tag interferes with debugging.")
498 __drv_reportError("Must succeed pool allocations are forbidden. "
499 "Allocation failures cause a system crash"))
505PVOID
506NTAPI
510
515 __drv_reportError("Must succeed pool allocations are forbidden. "
516 "Allocation failures cause a system crash"))
522PVOID
523NTAPI
528
529#ifndef POOL_TAGGING
530#define ExAllocatePoolWithQuotaTag(a,b,c) ExAllocatePoolWithQuota(a,b)
531#endif
532
537 __drv_reportError("Must succeed pool allocations are forbidden. "
538 "Allocation failures cause a system crash"))
544_Function_class_(ALLOCATE_FUNCTION)
546PVOID
547NTAPI
551 _In_ ULONG Tag);
552
553#ifndef POOL_TAGGING
554#define ExAllocatePoolWithTag(a,b,c) ExAllocatePool(a,b)
555#endif
556
561 __drv_reportError("Must succeed pool allocations are forbidden. "
562 "Allocation failures cause a system crash"))
569PVOID
570NTAPI
574 _In_ ULONG Tag,
576
582 __drv_reportError("Must succeed pool allocations are forbidden. "
583 "Allocation failures cause a system crash"))
589PVOID
590NTAPI
591ExAllocatePoolZero(
594 _In_ ULONG Tag)
595{
597
599
600 if (Allocation != NULL) {
602 }
603
604 return Allocation;
605}
606
612 __drv_reportError("Must succeed pool allocations are forbidden. "
613 "Allocation failures cause a system crash"))
619PVOID
620NTAPI
621ExAllocatePoolUninitialized(
624 _In_ ULONG Tag)
625{
627}
628
634 __drv_reportError("Must succeed pool allocations are forbidden. "
635 "Allocation failures cause a system crash"))
641PVOID
642NTAPI
643ExAllocatePoolQuotaZero (
646 _In_ ULONG Tag)
647{
649
651
652 if (Allocation != NULL) {
654 }
655
656 return Allocation;
657}
658
664 __drv_reportError("Must succeed pool allocations are forbidden. "
665 "Allocation failures cause a system crash"))
671PVOID
672NTAPI
673ExAllocatePoolQuotaUninitialized(
676 _In_ ULONG Tag)
677{
679}
680
686 __drv_reportError("Must succeed pool allocations are forbidden. "
687 "Allocation failures cause a system crash"))
693PVOID
694NTAPI
695ExAllocatePoolPriorityZero(
698 _In_ ULONG Tag,
700{
702
704
705 if (Allocation != NULL) {
707 }
708
709 return Allocation;
710}
711
717 __drv_reportError("Must succeed pool allocations are forbidden. "
718 "Allocation failures cause a system crash"))
724PVOID
725NTAPI
726ExAllocatePoolPriorityUninitialized(
729 _In_ ULONG Tag,
731{
733}
734
737VOID
738NTAPI
741
745NTAPI
747 _Outptr_ PCALLBACK_OBJECT *CallbackObject,
751
753VOID
754NTAPI
757
760VOID
761NTAPI
764
768NTAPI
771
773_Function_class_(FREE_FUNCTION)
775VOID
776NTAPI
779
782VOID
783NTAPI
786 _In_ ULONG Tag);
787
790ULONG
791NTAPI
794
798NTAPI
800
803ULONG
804NTAPI
807
810VOID
811NTAPI
814 _In_opt_ PALLOCATE_FUNCTION Allocate,
815 _In_opt_ PFREE_FUNCTION Free,
818 _In_ ULONG Tag,
820
823VOID
824NTAPI
827 _In_opt_ PALLOCATE_FUNCTION Allocate,
828 _In_opt_ PFREE_FUNCTION Free,
831 _In_ ULONG Tag,
833
837NTAPI
840
843NTAPI
848
849#if !defined(_M_IX86)
850#define ExInterlockedAddLargeStatistic(Addend, Increment) \
851 (VOID)InterlockedAdd64(&(Addend)->QuadPart, Increment)
852#else
853#define ExInterlockedAddLargeStatistic(Addend, Increment) \
854 (VOID)_InterlockedAddLargeStatistic((PLONGLONG)&(Addend)->QuadPart, Increment)
855#endif
856
858ULONG
864
865#if defined(_M_IX86)
866
870ExfInterlockedCompareExchange64(
872 _In_ PLONGLONG Exchange,
873 _In_ PLONGLONG Comperand);
874
875#define ExInterlockedCompareExchange64(Destination, Exchange, Comperand, Lock) \
876 ExfInterlockedCompareExchange64(Destination, Exchange, Comperand)
877
878#else
879
880#define ExInterlockedCompareExchange64(Destination, Exchange, Comperand, Lock) \
881 InterlockedCompareExchange64(Destination, *(Exchange), *(Comperand))
882
883#endif /* defined(_M_IX86) */
884
889 _Inout_ PLIST_ENTRY ListHead,
892
897 _Inout_ PLIST_ENTRY ListHead,
900
907
915
920 _Inout_ PLIST_ENTRY ListHead,
922
926NTAPI
928 _In_ ULONG ProcessorFeature);
929
933NTAPI
936
939ULONG
940NTAPI
943
944#define ExIsResourceAcquiredLite ExIsResourceAcquiredSharedLite
945
947VOID
948NTAPI
950 _In_ PLARGE_INTEGER LocalTime,
951 _Out_ PLARGE_INTEGER SystemTime);
952
953#if (NTDDI_VERSION >= NTDDI_WINBLUE)
954
955#define EX_TIMER_HIGH_RESOLUTION 0x4
956#define EX_TIMER_NO_WAKE 0x8
957#define EX_TIMER_UNLIMITED_TOLERANCE ((LONGLONG)-1)
958#define EX_TIMER_NOTIFICATION (1UL << 31)
959
962NTAPI
967
970NTAPI
976
979NTAPI
983
986NTAPI
992
994VOID
997{
998 ASSERT(FALSE);
999}
1000
1001#endif // NTDDI_WINBLUE
1002
1005VOID
1006NTAPI
1008 _In_ PCALLBACK_OBJECT CallbackObject,
1011
1014VOID
1015NTAPI
1019
1023VOID
1024NTAPI
1027
1030PVOID
1031NTAPI
1033 _Inout_ PCALLBACK_OBJECT CallbackObject,
1036
1040NTAPI
1043
1045_Requires_lock_held_(_Global_critical_region_)
1047VOID
1048NTAPI
1053
1054_Requires_lock_held_(_Global_critical_region_)
1059VOID
1063
1066VOID
1067NTAPI
1071
1074ULONG
1075NTAPI
1077 _In_ ULONG DesiredTime,
1079
1081VOID
1082NTAPI
1084 _In_ PLARGE_INTEGER SystemTime,
1085 _Out_ PLARGE_INTEGER LocalTime);
1086
1089VOID
1090NTAPI
1092 _Inout_ PVOID CbRegistration);
1093
1095$if (_NTDDK_)
1098NTAPI
1100 _Inout_ PZONE_HEADER Zone,
1103
1106NTAPI
1108 _Out_ PZONE_HEADER Zone,
1109 _In_ ULONG BlockSize,
1110 _Inout_ PVOID InitialSegment,
1111 _In_ ULONG InitialSegmentSize);
1112
1116NTAPI
1118 _Inout_ PZONE_HEADER Zone,
1122
1126NTAPI
1128 _Out_ UUID *Uuid);
1129
1133VOID
1134NTAPI
1136
1140VOID
1141NTAPI
1143
1145$if (_NTIFS_)
1146
1149SIZE_T
1150NTAPI
1152 _In_ PVOID PoolBlock,
1154
1156VOID
1157ExAdjustLookasideDepth(VOID);
1158
1161VOID
1162NTAPI
1166#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
1167
1168$if (_WDMDDK_ || _NTIFS_)
1169#if (NTDDI_VERSION >= NTDDI_WINXP)
1171$if (_WDMDDK_)
1172
1174_Post_satisfies_(return == 0 || return == 1)
1176BOOLEAN
1179 _Inout_ PEX_RUNDOWN_REF RunRef);
1180
1182VOID
1185 _Out_ PEX_RUNDOWN_REF RunRef);
1186
1188VOID
1191 _Inout_ PEX_RUNDOWN_REF RunRef);
1192
1194VOID
1197 _Inout_ PEX_RUNDOWN_REF RunRef);
1198
1200VOID
1203 _Out_ PEX_RUNDOWN_REF RunRef);
1204
1206BOOLEAN
1207NTAPI
1209 __drv_strictTypeMatch(__drv_typeExpr) _In_ SUITE_TYPE SuiteType);
1210
1212VOID
1215 _Inout_ PEX_RUNDOWN_REF RunRef);
1217$if (_NTIFS_)
1218
1222 _Inout_ PSLIST_HEADER ListHead,
1227$if (_WDMDDK_ || _NTIFS_)
1228#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
1230
1231$if (_WDMDDK_)
1232#if (NTDDI_VERSION >= NTDDI_WINXPSP2)
1233
1235_Post_satisfies_(return == 0 || return == 1)
1237BOOLEAN
1239ExAcquireRundownProtectionEx(
1240 _Inout_ PEX_RUNDOWN_REF RunRef,
1241 _In_ ULONG Count);
1242
1244VOID
1247 _Inout_ PEX_RUNDOWN_REF RunRef,
1248 _In_ ULONG Count);
1249
1250#endif /* (NTDDI_VERSION >= NTDDI_WINXPSP2) */
1251
1252#if (NTDDI_VERSION >= NTDDI_WS03SP1)
1253
1258NTAPI
1262
1265SIZE_T
1266NTAPI
1268
1270_Acquires_lock_(_Global_critical_region_)
1272PVOID
1273NTAPI
1277
1279_Acquires_lock_(_Global_critical_region_)
1281PVOID
1282NTAPI
1286
1288_Acquires_lock_(_Global_critical_region_)
1290PVOID
1291NTAPI
1295
1297_Releases_lock_(_Global_critical_region_)
1299VOID
1304
1307VOID
1308NTAPI
1310 _Out_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware,
1312
1315VOID
1316NTAPI
1318 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware);
1319
1321_Post_satisfies_(return == 0 || return == 1)
1323BOOLEAN
1325ExAcquireRundownProtectionCacheAware(
1326 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware);
1327
1329VOID
1332 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware);
1333
1335_Post_satisfies_(return == 0 || return == 1)
1337BOOLEAN
1339ExAcquireRundownProtectionCacheAwareEx(
1340 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware,
1341 _In_ ULONG Count);
1342
1344VOID
1348 _In_ ULONG Count);
1349
1351VOID
1355
1357VOID
1360 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware);
1361
1363VOID
1366 _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware);
1367
1368#endif /* (NTDDI_VERSION >= NTDDI_WS03SP1) */
1369
1370#if (NTDDI_VERSION >= NTDDI_VISTA)
1371
1375NTAPI
1376ExInitializeLookasideListEx(
1378 _In_opt_ PALLOCATE_FUNCTION_EX Allocate,
1379 _In_opt_ PFREE_FUNCTION_EX Free,
1383 _In_ ULONG Tag,
1384 _In_ USHORT Depth);
1385
1388VOID
1389NTAPI
1390ExDeleteLookasideListEx(
1392
1395VOID
1396NTAPI
1397ExFlushLookasideListEx(
1399
1400#ifdef _MSC_VER
1401#pragma warning(push)
1402#pragma warning(disable:__WARNING_MEMORY_NOT_ACQUIRED)
1403#endif
1404
1409PVOID
1410ExAllocateFromLookasideListEx(
1412{
1413 PVOID Entry;
1414
1415 Lookaside->L.TotalAllocates += 1;
1416#ifdef NONAMELESSUNION
1417 Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
1418 if (Entry == NULL) {
1419 Lookaside->L.u2.AllocateMisses += 1;
1420 Entry = (Lookaside->L.u4.AllocateEx)(Lookaside->L.Type,
1421 Lookaside->L.Size,
1422 Lookaside->L.Tag,
1423 Lookaside);
1424 }
1425#else /* NONAMELESSUNION */
1427 if (Entry == NULL) {
1428 Lookaside->L.AllocateMisses += 1;
1429 Entry = (Lookaside->L.AllocateEx)(Lookaside->L.Type,
1430 Lookaside->L.Size,
1431 Lookaside->L.Tag,
1432 Lookaside);
1433 }
1434#endif /* NONAMELESSUNION */
1435 return Entry;
1436}
1437
1438#ifdef _MSC_VER
1439#pragma warning(pop)
1440#endif
1441
1444VOID
1445ExFreeToLookasideListEx(
1448{
1449 Lookaside->L.TotalFrees += 1;
1450 if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
1451 Lookaside->L.FreeMisses += 1;
1452 (Lookaside->L.FreeEx)(Entry, Lookaside);
1453 } else {
1455 }
1456 return;
1457}
1458
1459#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
1460
1461#if (NTDDI_VERSION >= NTDDI_WIN7)
1462
1465VOID
1466NTAPI
1467ExSetResourceOwnerPointerEx(
1470 _In_ ULONG Flags);
1471
1472#define FLAG_OWNER_POINTER_IS_THREAD 0x1
1473
1474#endif /* (NTDDI_VERSION >= NTDDI_WIN7) */
1475
1480static __inline
1481PVOID
1482ExAllocateFromNPagedLookasideList(
1484{
1485 PVOID Entry;
1486
1487 Lookaside->L.TotalAllocates++;
1488#ifdef NONAMELESSUNION
1489#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1491 &Lookaside->Lock__ObsoleteButDoNotDelete);
1492#else
1493 Entry = InterlockedPopEntrySList(&Lookaside->L.u.ListHead);
1494#endif
1495 if (Entry == NULL) {
1496 Lookaside->L.u2.AllocateMisses++;
1497 Entry = (Lookaside->L.u4.Allocate)(Lookaside->L.Type,
1498 Lookaside->L.Size,
1499 Lookaside->L.Tag);
1500 }
1501#else /* NONAMELESSUNION */
1502#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1504 &Lookaside->Lock__ObsoleteButDoNotDelete);
1505#else
1507#endif
1508 if (Entry == NULL) {
1509 Lookaside->L.AllocateMisses++;
1510 Entry = (Lookaside->L.Allocate)(Lookaside->L.Type,
1511 Lookaside->L.Size,
1512 Lookaside->L.Tag);
1513 }
1514#endif /* NONAMELESSUNION */
1515 return Entry;
1516}
1517
1519static __inline
1520VOID
1521ExFreeToNPagedLookasideList(
1524{
1525 Lookaside->L.TotalFrees++;
1526#ifdef NONAMELESSUNION
1527 if (ExQueryDepthSList(&Lookaside->L.u.ListHead) >= Lookaside->L.Depth) {
1528 Lookaside->L.u3.FreeMisses++;
1529 (Lookaside->L.u5.Free)(Entry);
1530 } else {
1531#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1534 &Lookaside->Lock__ObsoleteButDoNotDelete);
1535#else
1537#endif
1538 }
1539#else /* NONAMELESSUNION */
1540 if (ExQueryDepthSList(&Lookaside->L.ListHead) >= Lookaside->L.Depth) {
1541 Lookaside->L.FreeMisses++;
1542 (Lookaside->L.Free)(Entry);
1543 } else {
1544#if defined(_WIN2K_COMPAT_SLIST_USAGE) && defined(_X86_)
1547 &Lookaside->Lock__ObsoleteButDoNotDelete);
1548#else
1550#endif
1551 }
1552#endif /* NONAMELESSUNION */
1553}
1554
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define __drv_aliasesMem
Definition: btrfs_drv.h:203
return
Definition: dirsup.c:529
#define _Acquires_lock_(lock)
#define _Requires_lock_held_(lock)
#define _Acquires_exclusive_lock_(lock)
#define _Acquires_shared_lock_(lock)
#define _Requires_lock_not_held_(lock)
#define _Releases_lock_(lock)
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
#define P(row, col)
#define __drv_reportError(why)
Definition: driverspecs.h:320
#define __drv_preferredFunction(func, why)
Definition: driverspecs.h:311
#define __drv_freesMem(kind)
Definition: driverspecs.h:272
#define _IRQL_requires_max_(irql)
Definition: driverspecs.h:230
#define __drv_allocatesMem(kind)
Definition: driverspecs.h:257
#define _IRQL_requires_(irql)
Definition: driverspecs.h:229
#define _IRQL_raises_(irql)
Definition: driverspecs.h:228
#define _IRQL_saves_global_(kind, param)
Definition: driverspecs.h:236
#define _IRQL_restores_global_(kind, param)
Definition: driverspecs.h:234
#define __drv_strictTypeMatch(mode)
Definition: driverspecs.h:330
int failures
Definition: ehframes.cpp:20
#define ExLocalTimeToSystemTime(LocTime, SysTime)
Definition: env_spec_w32.h:738
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define ExReleaseResourceForThreadLite(res, thrdID)
Definition: env_spec_w32.h:635
NTSTATUS ExInitializeResourceLite(PULONG res)
Definition: env_spec_w32.h:641
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define ExConvertExclusiveToSharedLite(res)
Definition: env_spec_w32.h:652
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
#define ExDeleteResourceLite(res)
Definition: env_spec_w32.h:647
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define ExSystemTimeToLocalTime(SysTime, LocTime)
Definition: env_spec_w32.h:729
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define PagedPool
Definition: env_spec_w32.h:308
#define ExInitializePushLock
Definition: ex.h:1013
#define ExWaitForRundownProtectionRelease
Definition: ex.h:138
#define ExReleaseRundownProtection
Definition: ex.h:136
#define ExGetPreviousMode
Definition: ex.h:140
#define ExInitializeRundownProtection
Definition: ex.h:137
#define ExRundownCompleted
Definition: ex.h:139
#define ExAcquireRundownProtection
Definition: ex.h:135
SIZE_T NTAPI ExQueryPoolBlockSize(IN PVOID PoolBlock, OUT PBOOLEAN QuotaCharged)
Definition: expool.c:2933
PVOID NTAPI ExAllocatePoolWithTagPriority(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag, IN EX_POOL_PRIORITY Priority)
Definition: expool.c:2963
PVOID NTAPI ExAllocatePoolWithQuota(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes)
Definition: expool.c:2949
#define ExAllocatePool(type, size)
Definition: fbtusb.h:44
IN OUT PLONG Addend
Definition: CrNtStubs.h:25
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:46
_Must_inspect_result_ _In_ PFLT_CALLBACK_DATA _In_ PFLT_DEFERRED_IO_WORKITEM_ROUTINE _In_ WORK_QUEUE_TYPE QueueType
Definition: fltkernel.h:1978
Status
Definition: gdiplustypes.h:25
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
VOID NTAPI ExRaiseAccessViolation(VOID)
Definition: harderr.c:308
VOID NTAPI ExRaiseDatatypeMisalignment(VOID)
Definition: harderr.c:330
#define _NTIFS_
Definition: ifssupp.h:20
if(dx< 0)
Definition: linetemp.h:194
VOID NTAPI ExInitializePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:270
VOID NTAPI ExDeletePagedLookasideList(IN PPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:194
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:218
#define ASSERT(a)
Definition: mode.c:44
NTKERNELAPI NTSTATUS ExUuidCreate(OUT UUID *Uuid)
Definition: uuid.c:380
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
void Cancel(int sigNum)
Definition: shell.c:481
#define _Function_class_(x)
Definition: ms_sal.h:2946
#define _Success_(expr)
Definition: ms_sal.h:259
#define _Inout_
Definition: ms_sal.h:378
#define _Post_notnull_
Definition: ms_sal.h:701
#define _Ret_maybenull_
Definition: ms_sal.h:529
#define _Outptr_
Definition: ms_sal.h:427
#define _Pre_notnull_
Definition: ms_sal.h:680
#define _Inout_opt_
Definition: ms_sal.h:379
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _Out_
Definition: ms_sal.h:345
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Literal_
Definition: ms_sal.h:553
#define _Post_writable_byte_size_(size)
Definition: ms_sal.h:652
#define _Post_maybenull_
Definition: ms_sal.h:706
#define _Post_satisfies_(cond)
Definition: ms_sal.h:588
#define _Interlocked_operand_
Definition: ms_sal.h:2951
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES ObjectAttributes
Definition: exfuncs.h:166
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
Definition: rtlfuncs.h:3004
PSLIST_ENTRY FASTCALL InterlockedPushListSList(_Inout_ PSLIST_HEADER ListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY List, _Inout_ PSLIST_ENTRY ListEnd, _In_ ULONG Count)
#define FASTCALL
Definition: nt_native.h:50
struct _SINGLE_LIST_ENTRY * PSINGLE_LIST_ENTRY
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:382
#define _NTDDK_
@ SynchronizationEvent
VOID NTAPI ExUnregisterCallback(IN PVOID CallbackRegistrationHandle)
Definition: callback.c:636
VOID NTAPI ExNotifyCallback(IN PCALLBACK_OBJECT CallbackObject, IN PVOID Argument1, IN PVOID Argument2)
Definition: callback.c:467
PVOID NTAPI ExRegisterCallback(IN PCALLBACK_OBJECT CallbackObject, IN PCALLBACK_FUNCTION CallbackFunction, IN PVOID CallbackContext)
Definition: callback.c:556
NTSTATUS NTAPI ExCreateCallback(OUT PCALLBACK_OBJECT *CallbackObject, IN POBJECT_ATTRIBUTES ObjectAttributes, IN BOOLEAN Create, IN BOOLEAN AllowMultipleCallbacks)
Definition: callback.c:361
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
VOID NTAPI ExSetResourceOwnerPointer(IN PERESOURCE Resource, IN PVOID OwnerPointer)
Definition: resource.c:2050
BOOLEAN NTAPI ExAcquireSharedWaitForExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:1222
VOID NTAPI ExDisableResourceBoostLite(IN PERESOURCE Resource)
Definition: resource.c:1506
NTSTATUS NTAPI ExReinitializeResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1761
PVOID NTAPI ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(IN PERESOURCE Resource)
Definition: resource.c:2254
BOOLEAN NTAPI ExAcquireSharedStarveExclusive(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:1068
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
BOOLEAN NTAPI ExIsResourceAcquiredExclusiveLite(IN PERESOURCE Resource)
Definition: resource.c:1624
ULONG NTAPI ExIsResourceAcquiredSharedLite(IN PERESOURCE Resource)
Definition: resource.c:1663
PVOID NTAPI ExEnterCriticalRegionAndAcquireResourceShared(IN PERESOURCE Resource)
Definition: resource.c:2223
ULONG NTAPI ExGetSharedWaiterCount(IN PERESOURCE Resource)
Definition: resource.c:1563
ULONG NTAPI ExGetExclusiveWaiterCount(IN PERESOURCE Resource)
Definition: resource.c:1540
PVOID NTAPI ExEnterCriticalRegionAndAcquireResourceExclusive(IN PERESOURCE Resource)
Definition: resource.c:2194
VOID FASTCALL ExReleaseResourceAndLeaveCriticalRegion(IN PERESOURCE Resource)
Definition: resource.c:2283
BOOLEAN NTAPI ExIsProcessorFeaturePresent(IN ULONG ProcessorFeature)
Definition: sysinfo.c:363
ULONG NTAPI ExSetTimerResolution(IN ULONG DesiredTime, IN BOOLEAN SetResolution)
Definition: time.c:131
#define ExRaiseStatus
Definition: ntoskrnl.h:114
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
PEX_RUNDOWN_REF_CACHE_AWARE NTAPI ExAllocateCacheAwareRundownProtection(IN POOL_TYPE PoolType, IN ULONG Tag)
Definition: rundown.c:562
VOID NTAPI ExInitializeRundownProtectionCacheAware(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN SIZE_T Size)
Definition: rundown.c:667
VOID NTAPI ExFreeCacheAwareRundownProtection(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
Definition: rundown.c:646
SIZE_T NTAPI ExSizeOfRundownProtectionCacheAware(VOID)
Definition: rundown.c:725
int __cdecl system(_In_opt_z_ const char *_Command)
return succeed
Definition: scsi.h:3736
base of all file and directory entries
Definition: entries.h:83
Definition: typedefs.h:120
Definition: ntbasedef.h:628
Definition: ecma_167.h:138
uint32_t * PULONG
Definition: typedefs.h:59
unsigned char * PBOOLEAN
Definition: typedefs.h:53
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
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define IN
Definition: typedefs.h:39
int32_t * PLONG
Definition: typedefs.h:58
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
_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
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:170
_In_ WDFINTERRUPT _In_ WDF_INTERRUPT_POLICY _In_ WDF_INTERRUPT_PRIORITY Priority
Definition: wdfinterrupt.h:655
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback
Definition: wdfinterrupt.h:458
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:869
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _In_ _Strict_type_match_ POOL_TYPE _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_opt_ ULONG _Out_ WDFLOOKASIDE * Lookaside
Definition: wdfmemory.h:414
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ _Strict_type_match_ POOL_TYPE _In_opt_ ULONG PoolTag
Definition: wdfmemory.h:164
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127
_In_ WDFTIMER _In_ LONGLONG DueTime
Definition: wdftimer.h:190
#define FORCEINLINE
Definition: wdftypes.h:67
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:115
#define _WDMDDK_
Definition: wdm.template.h:26
#define NTKERNELAPI
VOID NTAPI ExQueueWorkItem(IN PWORK_QUEUE_ITEM WorkItem, IN WORK_QUEUE_TYPE QueueType)
Definition: work.c:723
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
_In_ ERESOURCE_THREAD ResourceThreadId
Definition: exfuncs.h:1052
Allocation
Definition: exfuncs.h:598
NTKERNELAPI PSLIST_ENTRY ExpInterlockedFlushSList(_Inout_ PSLIST_HEADER SListHead)
#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock)
Definition: exfuncs.h:163
NTKERNELAPI BOOLEAN NTAPI ExSetTimer(_In_ PEX_TIMER Timer, _In_ LONGLONG DueTime, _In_ LONGLONG Period, _In_opt_ PEXT_SET_PARAMETERS Parameters)
FORCEINLINE USHORT ExQueryDepthSList(_In_ PSLIST_HEADER SListHead)
Definition: exfuncs.h:153
#define RESULT_ZERO
Definition: exfuncs.h:353
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtectionCacheAware(_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
_In_ PVOID Entry
Definition: exfuncs.h:229
NTKERNELAPI VOID NTAPI ExDeleteNPagedLookasideList(_Inout_ PNPAGED_LOOKASIDE_LIST Lookaside)
#define ExAllocatePoolWithQuotaTag(a, b, c)
Definition: exfuncs.h:530
#define ExInterlockedPopEntrySList(SListHead, Lock)
Definition: exfuncs.h:166
$endif(_WDMDDK_) $if(_NTDDK_) static __inline PVOID ExAllocateFromZone(IN PZONE_HEADER Zone)
Definition: exfuncs.h:284
_In_opt_ PALLOCATE_FUNCTION Allocate
Definition: exfuncs.h:814
_In_ SIZE_T RunRefSize
Definition: exfuncs.h:1311
NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedRemoveHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
_In_opt_ PVOID _In_opt_ PVOID Argument2
Definition: exfuncs.h:1010
FastMutex NTKERNELAPI VOID FASTCALL ExReleaseFastMutex(_Inout_ _Requires_lock_held_(*_Curr_) _Releases_lock_(*_Curr_) PFAST_MUTEX FastMutex)
enum _INTERLOCKED_RESULT INTERLOCKED_RESULT
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionEx(_Inout_ PEX_RUNDOWN_REF RunRef, _In_ ULONG Count)
#define RESULT_NEGATIVE
Definition: exfuncs.h:354
NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedInsertTailList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY ListEntry, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
NTKERNELAPI PSLIST_ENTRY ExpInterlockedPushEntrySList(_Inout_ PSLIST_HEADER SListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY SListEntry)
NTKERNELAPI PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPopEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
#define ExAllocatePoolWithTag(a, b, c)
Definition: exfuncs.h:554
_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ BOOLEAN AllowMultipleCallbacks
Definition: exfuncs.h:750
NTKERNELAPI ULONG FASTCALL ExInterlockedAddUlong(_Inout_ PULONG Addend, _In_ ULONG Increment, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
NTKERNELAPI BOOLEAN NTAPI ExCancelTimer(_Inout_ PEX_TIMER Timer, _In_opt_ PEXT_CANCEL_PARAMETERS Parameters)
_In_opt_ PVOID Argument1
Definition: exfuncs.h:1009
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1225
_INTERLOCKED_RESULT
Definition: exfuncs.h:358
@ ResultPositive
Definition: exfuncs.h:361
@ ResultZero
Definition: exfuncs.h:360
@ ResultNegative
Definition: exfuncs.h:359
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:819
NTKERNELAPI VOID FASTCALL ExWaitForRundownProtectionReleaseCacheAware(IN OUT PEX_RUNDOWN_REF_CACHE_AWARE RunRef)
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAware(_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
NTKERNELAPI BOOLEAN NTAPI ExDeleteTimer(_In_ PEX_TIMER Timer, _In_ BOOLEAN Cancel, _In_ BOOLEAN Wait, _In_opt_ PEXT_DELETE_PARAMETERS Parameters)
_Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T NumberOfBytes
Definition: exfuncs.h:490
NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedInsertHeadList(_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY ListEntry, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
NTKERNELAPI PEX_TIMER NTAPI ExAllocateTimer(_In_opt_ PEXT_CALLBACK Callback, _In_opt_ PVOID CallbackContext, _In_ ULONG Attributes)
NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtection(_Inout_ PEX_RUNDOWN_REF RunRef)
NTKERNELAPI PSLIST_ENTRY ExpInterlockedPopEntrySList(_Inout_ PSLIST_HEADER SListHead)
NTKERNELAPI NTSTATUS NTAPI ExInitializeZone(_Out_ PZONE_HEADER Zone, _In_ ULONG BlockSize, _Inout_ PVOID InitialSegment, _In_ ULONG InitialSegmentSize)
NTKERNELAPI LARGE_INTEGER NTAPI ExInterlockedAddLargeInteger(_Inout_ PLARGE_INTEGER Addend, _In_ LARGE_INTEGER Increment, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd
Definition: exfuncs.h:1224
_In_ PVOID OwnerPointer
Definition: exfuncs.h:1070
$if(_WDMDDK_) _IRQL_raises_(APC_LEVEL) _IRQL_saves_global_(OldIrql
Definition: ke.h:1
NTKERNELAPI VOID FASTCALL ExRundownCompletedCacheAware(_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
_In_ PCALLBACK_FUNCTION _In_opt_ PVOID CallbackContext
Definition: exfuncs.h:1035
_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN Create
Definition: exfuncs.h:749
NTKERNELAPI BOOLEAN NTAPI ExVerifySuite(__drv_strictTypeMatch(__drv_typeExpr) _In_ SUITE_TYPE SuiteType)
FastMutex NTKERNELAPI VOID FASTCALL ExAcquireFastMutex(_Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PFAST_MUTEX FastMutex)
#define RESULT_POSITIVE
Definition: exfuncs.h:355
_In_ PCALLBACK_FUNCTION CallbackFunction
Definition: exfuncs.h:1034
_Acquires_shared_lock_ _Curr_ PERESOURCE Resource
Definition: exfuncs.h:440
_Out_ PBOOLEAN QuotaCharged
Definition: exfuncs.h:1153
static __inline PVOID ExFreeToZone(IN PZONE_HEADER Zone, IN PVOID Block)
Definition: exfuncs.h:297
FORCEINLINE VOID ExInitializeSetTimerParameters(_Out_ PEXT_SET_PARAMETERS Parameters)
Definition: exfuncs.h:995
_In_ BOOLEAN SetResolution
Definition: exfuncs.h:1078
_Inout_ PVOID _In_ ULONG SegmentSize
Definition: exfuncs.h:1102
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAwareEx(_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRef, _In_ ULONG Count)
NTKERNELAPI PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPushEntryList(_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PSINGLE_LIST_ENTRY ListEntry, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
Definition: exfuncs.h:815
#define ExInterlockedFlushSList(SListHead)
Definition: exfuncs.h:169
_Must_inspect_result_ FastMutex NTKERNELAPI BOOLEAN FASTCALL ExTryToAcquireFastMutex(_Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PFAST_MUTEX FastMutex)
struct _EX_TIMER * PEX_TIMER
Definition: extypes.h:291
CALLBACK_FUNCTION * PCALLBACK_FUNCTION
Definition: extypes.h:96
EXT_CALLBACK * PEXT_CALLBACK
Definition: extypes.h:303
* PFAST_MUTEX
Definition: extypes.h:17
enum _WORK_QUEUE_TYPE WORK_QUEUE_TYPE
enum _EX_POOL_PRIORITY EX_POOL_PRIORITY
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 _PAGED_LOOKASIDE_LIST * PPAGED_LOOKASIDE_LIST
#define POOL_QUOTA_FAIL_INSTEAD_OF_RAISE
#define FM_LOCK_BIT
Definition: iotypes.h:1426
#define POOL_RAISE_IF_ALLOCATION_FAILURE
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:778
_In_ LARGE_INTEGER _In_ ULONG Period
Definition: kefuncs.h:1313
@ NonPagedPoolMustSucceed
Definition: ketypes.h:880
CCHAR KPROCESSOR_MODE
Definition: ketypes.h:7
#define InterlockedPushEntrySList(SListHead, SListEntry)
Definition: rtlfuncs.h:3389
#define InterlockedPopEntrySList(SListHead)
Definition: rtlfuncs.h:3392
#define PSLIST_ENTRY
Definition: rtltypes.h:134
NTSTATUS NTAPI ExInterlockedExtendZone(PZONE_HEADER Zone, PVOID Segment, ULONG SegmentSize, PKSPIN_LOCK Lock)
Definition: zone.c:73
NTSTATUS NTAPI ExExtendZone(PZONE_HEADER Zone, PVOID Segment, ULONG SegmentSize)
Definition: zone.c:23