#include <ntoskrnl.h>
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ ExAllocateCacheAwareRundownProtection()
Definition at line 562 of file rundown.c.
566 PVOID PoolToFree, RunRefs;
574 if (RunRefCacheAware ==
NULL)
598 if (PoolToFree ==
NULL)
612 if (PoolToFree ==
NULL)
622 RunRefs = PoolToFree;
625 RunRefCacheAware->
RunRefs = RunRefs;
629 if (RunRefCacheAware->
Number != 0)
638 return RunRefCacheAware;
FORCEINLINE VOID _ExInitializeRundownProtection(IN PEX_RUNDOWN_REF RunRef)
struct _EX_RUNDOWN_REF EX_RUNDOWN_REF
ULONG NTAPI KeGetRecommendedSharedDataAlignment(VOID)
#define ExAllocatePoolWithTag(hernya, size, tag)
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ _Strict_type_match_ POOL_TYPE PoolType
#define ALIGN_UP_BY(size, align)
#define ExFreePoolWithTag(_P, _T)
◆ ExfAcquireRundownProtection()
Definition at line 36 of file rundown.c.
#define EX_RUNDOWN_COUNT_INC
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define ExpChangeRundown(x, y, z)
#define EX_RUNDOWN_ACTIVE
◆ ExfAcquireRundownProtectionCacheAware()
Definition at line 384 of file rundown.c.
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
FORCEINLINE BOOLEAN _ExAcquireRundownProtection(IN PEX_RUNDOWN_REF RunRef)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
◆ ExfAcquireRundownProtectionCacheAwareEx()
Definition at line 397 of file rundown.c.
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
BOOLEAN FASTCALL ExfAcquireRundownProtectionEx(IN PEX_RUNDOWN_REF RunRef, IN ULONG Count)
◆ ExfAcquireRundownProtectionEx()
◆ ExfInitializeRundownProtection()
◆ ExFreeCacheAwareRundownProtection()
Definition at line 646 of file rundown.c.
655 ASSERT(RunRefCacheAware->PoolToFree != (
PVOID)0xBADCA11);
#define ExFreePoolWithTag(_P, _T)
◆ ExfReInitializeRundownProtection()
Definition at line 141 of file rundown.c.
#define ExpSetRundown(x, y)
#define EX_RUNDOWN_ACTIVE
◆ ExfReInitializeRundownProtectionCacheAware()
Definition at line 534 of file rundown.c.
537 ULONG ProcCount, Current;
539 ProcCount = RunRefCacheAware->Number;
547 for (Current = 0; Current < ProcCount; ++Current)
#define ExpSetRundown(x, y)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
#define EX_RUNDOWN_ACTIVE
◆ ExfReleaseRundownProtection()
Definition at line 197 of file rundown.c.
216 if (NewValue ==
Value)
break;
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
#define EX_RUNDOWN_COUNT_INC
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define ExpChangeRundown(x, y, z)
struct _EX_RUNDOWN_WAIT_BLOCK * PEX_RUNDOWN_WAIT_BLOCK
#define InterlockedDecrementSizeT(a)
#define EX_RUNDOWN_ACTIVE
◆ ExfReleaseRundownProtectionCacheAware()
Definition at line 411 of file rundown.c.
FORCEINLINE VOID _ExReleaseRundownProtection(IN PEX_RUNDOWN_REF RunRef)
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
◆ ExfReleaseRundownProtectionCacheAwareEx()
Definition at line 424 of file rundown.c.
FORCEINLINE ULONG KeGetCurrentProcessorNumber(VOID)
VOID FASTCALL ExfReleaseRundownProtectionEx(IN PEX_RUNDOWN_REF RunRef, IN ULONG Count)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
◆ ExfReleaseRundownProtectionEx()
Definition at line 260 of file rundown.c.
281 if (NewValue ==
Value)
break;
LONG NTAPI KeSetEvent(IN PKEVENT Event, IN KPRIORITY Increment, IN BOOLEAN Wait)
#define EX_RUNDOWN_COUNT_INC
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define ExpChangeRundown(x, y, z)
#define InterlockedExchangeAddSizeT(a, b)
struct _EX_RUNDOWN_WAIT_BLOCK * PEX_RUNDOWN_WAIT_BLOCK
#define EX_RUNDOWN_ACTIVE
Referenced by ExCompareExchangeCallBack(), ExfReleaseRundownProtectionCacheAwareEx(), and ExReferenceCallBackBlock().
◆ ExfRundownCompleted()
Definition at line 169 of file rundown.c.
#define ExpSetRundown(x, y)
#define EX_RUNDOWN_ACTIVE
◆ ExfRundownCompletedCacheAware()
Definition at line 506 of file rundown.c.
509 ULONG ProcCount, Current;
511 ProcCount = RunRefCacheAware->Number;
519 for (Current = 0; Current < ProcCount; ++Current)
#define ExpSetRundown(x, y)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
#define EX_RUNDOWN_ACTIVE
◆ ExfWaitForRundownProtectionRelease()
Definition at line 324 of file rundown.c.
364 if (NewValue ==
Value)
break;
#define EX_RUNDOWN_COUNT_SHIFT
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
_In_ PVOID _In_ ULONG Event
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define ExpChangeRundown(x, y, z)
#define KeInitializeEvent(pEvt, foo, foo2)
struct _EX_RUNDOWN_WAIT_BLOCK * PEX_RUNDOWN_WAIT_BLOCK
#define EX_RUNDOWN_ACTIVE
◆ ExfWaitForRundownProtectionReleaseCacheAware()
Definition at line 438 of file rundown.c.
445 ProcCount = RunRefCacheAware->Number;
457 for (Current = 0; Current < ProcCount; ++Current)
469 if (OldValue ==
Value)
#define EX_RUNDOWN_COUNT_SHIFT
NTSTATUS NTAPI KeWaitForSingleObject(IN PVOID Object, IN KWAIT_REASON WaitReason, IN KPROCESSOR_MODE WaitMode, IN BOOLEAN Alertable, IN PLARGE_INTEGER Timeout OPTIONAL)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
#define ExpChangeRundown(x, y, z)
#define InterlockedExchangeAddSizeT(a, b)
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
#define KeInitializeEvent(pEvt, foo, foo2)
struct _EX_RUNDOWN_WAIT_BLOCK * PEX_RUNDOWN_WAIT_BLOCK
#define EX_RUNDOWN_ACTIVE
◆ ExInitializeRundownProtectionCacheAware()
Definition at line 667 of file rundown.c.
702 RunRefCacheAware->RunRefs =
Pool;
704 RunRefCacheAware->Number =
Count;
707 RunRefCacheAware->PoolToFree = (
PVOID)0xBADCA11u;
710 if (RunRefCacheAware->Number != 0)
FORCEINLINE VOID _ExInitializeRundownProtection(IN PEX_RUNDOWN_REF RunRef)
struct _EX_RUNDOWN_REF EX_RUNDOWN_REF
IN PVOID IN PVOID IN USHORT IN USHORT Size
ULONG NTAPI KeGetRecommendedSharedDataAlignment(VOID)
struct _EX_RUNDOWN_REF_CACHE_AWARE EX_RUNDOWN_REF_CACHE_AWARE
FORCEINLINE PEX_RUNDOWN_REF ExGetRunRefForGivenProcessor(IN PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware, IN ULONG ProcNumber)
#define ALIGN_UP_BY(size, align)
◆ ExSizeOfRundownProtectionCacheAware()
Definition at line 725 of file rundown.c.
struct _EX_RUNDOWN_REF EX_RUNDOWN_REF
IN PVOID IN PVOID IN USHORT IN USHORT Size
ULONG NTAPI KeGetRecommendedSharedDataAlignment(VOID)
struct _EX_RUNDOWN_REF_CACHE_AWARE EX_RUNDOWN_REF_CACHE_AWARE