ReactOS 0.4.15-dev-7958-gcd0bb1a
exfuncs.h File Reference

Go to the source code of this file.

Macros

#define ExInterlockedIncrementLong(Addend, Lock)   Exfi386InterlockedIncrementLong(Addend)
 
#define ExInterlockedDecrementLong(Addend, Lock)   Exfi386InterlockedDecrementLong(Addend)
 
#define ExInterlockedExchangeUlong(Target, Value, Lock)   Exfi386InterlockedExchangeUlong(Target, Value)
 
#define ExAcquireSpinLock(Lock, OldIrql)   KeAcquireSpinLock((Lock), (OldIrql))
 
#define ExReleaseSpinLock(Lock, OldIrql)   KeReleaseSpinLock((Lock), (OldIrql))
 
#define ExAcquireSpinLockAtDpcLevel(Lock)   KeAcquireSpinLockAtDpcLevel(Lock)
 
#define ExReleaseSpinLockFromDpcLevel(Lock)   KeReleaseSpinLockFromDpcLevel(Lock)
 
#define ExInitializeSListHead   InitializeSListHead
 
#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock)    ExpInterlockedPushEntrySList(SListHead, SListEntry)
 
#define ExInterlockedPopEntrySList(SListHead, Lock)    ExpInterlockedPopEntrySList(SListHead)
 
#define ExInterlockedFlushSList(SListHead)    ExpInterlockedFlushSList(SListHead)
 
#define ExGetCurrentResourceThread()   ((ULONG_PTR)PsGetCurrentThread())
 
#define ExReleaseResource(R)   (ExReleaseResourceLite(R))
 
#define ExInitializeWorkItem(Item, Routine, Context)
 
#define ExInterlockedAllocateFromZone(Zone, Lock)    ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock))
 
#define ExInterlockedFreeToZone(Zone, Block, Lock)    ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock)
 
#define ExIsFullZone(Zone)    ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL)
 
#define ExIsObjectInFirstZoneSegment(Zone, Object)
 
#define ExAcquireResourceExclusive   ExAcquireResourceExclusiveLite
 
#define ExAcquireResourceShared   ExAcquireResourceSharedLite
 
#define ExConvertExclusiveToShared   ExConvertExclusiveToSharedLite
 
#define ExDeleteResource   ExDeleteResourceLite
 
#define ExInitializeResource   ExInitializeResourceLite
 
#define ExIsResourceAcquiredExclusive   ExIsResourceAcquiredExclusiveLite
 
#define ExIsResourceAcquiredShared   ExIsResourceAcquiredSharedLite
 
#define ExIsResourceAcquired   ExIsResourceAcquiredSharedLite
 
#define ExReleaseResourceForThread   ExReleaseResourceForThreadLite
 
#define RESULT_ZERO   0
 
#define RESULT_NEGATIVE   1
 
#define RESULT_POSITIVE   2
 
#define ExDisableResourceBoost   ExDisableResourceBoostLite
 
#define ExAllocatePoolWithQuotaTag(a, b, c)   ExAllocatePoolWithQuota(a,b)
 
#define ExAllocatePoolWithTag(a, b, c)   ExAllocatePool(a,b)
 
#define ExInterlockedAddLargeStatistic(Addend, Increment)    (VOID)InterlockedAdd64(&(Addend)->QuadPart, Increment)
 
#define ExInterlockedCompareExchange64(Destination, Exchange, Comperand, Lock)    InterlockedCompareExchange64(Destination, *(Exchange), *(Comperand))
 
#define ExIsResourceAcquiredLite   ExIsResourceAcquiredSharedLite
 
#define EX_TIMER_HIGH_RESOLUTION   0x4
 
#define EX_TIMER_NO_WAKE   0x8
 
#define EX_TIMER_UNLIMITED_TOLERANCE   ((LONGLONG)-1)
 
#define EX_TIMER_NOTIFICATION   (1UL << 31)
 
#define FLAG_OWNER_POINTER_IS_THREAD   0x1
 

Typedefs

typedef enum _INTERLOCKED_RESULT INTERLOCKED_RESULT
 

Enumerations

enum  _INTERLOCKED_RESULT { ResultNegative = RESULT_NEGATIVE , ResultZero = RESULT_ZERO , ResultPositive = RESULT_POSITIVE }
 

Functions

 $if (_WDMDDK_) _IRQL_raises_(APC_LEVEL) _IRQL_saves_global_(OldIrql
 
FastMutex NTKERNELAPI VOID FASTCALL ExAcquireFastMutex (_Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PFAST_MUTEX FastMutex)
 
 _IRQL_requires_ (APC_LEVEL) _IRQL_restores_global_(OldIrql
 
FastMutex NTKERNELAPI VOID FASTCALL ExReleaseFastMutex (_Inout_ _Requires_lock_held_(*_Curr_) _Releases_lock_(*_Curr_) PFAST_MUTEX FastMutex)
 
_Must_inspect_result_ _Success_ (return!=FALSE) _IRQL_raises_(APC_LEVEL) _IRQL_saves_global_(OldIrql
 
_Must_inspect_result_ FastMutex NTKERNELAPI BOOLEAN FASTCALL ExTryToAcquireFastMutex (_Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PFAST_MUTEX FastMutex)
 
NTKERNELAPI PSLIST_ENTRY ExpInterlockedPushEntrySList (_Inout_ PSLIST_HEADER SListHead, _Inout_ __drv_aliasesMem PSLIST_ENTRY SListEntry)
 
NTKERNELAPI PSLIST_ENTRY ExpInterlockedPopEntrySList (_Inout_ PSLIST_HEADER SListHead)
 
NTKERNELAPI PSLIST_ENTRY ExpInterlockedFlushSList (_Inout_ PSLIST_HEADER SListHead)
 
FORCEINLINE USHORT ExQueryDepthSList (_In_ PSLIST_HEADER SListHead)
 
 _IRQL_requires_max_ (APC_LEVEL) static __inline PVOID ExAllocateFromPagedLookasideList(_Inout_ PPAGED_LOOKASIDE_LIST Lookaside)
 
 if (ExQueryDepthSList(&Lookaside->L.ListHead) >=Lookaside->L.Depth)
 
FORCEINLINE VOID ExInitializeFastMutex (_Out_ PFAST_MUTEX FastMutex)
 
 $endif (_WDMDDK_) $if(_NTDDK_) static __inline PVOID ExAllocateFromZone(IN PZONE_HEADER Zone)
 
static __inline PVOID ExFreeToZone (IN PZONE_HEADER Zone, IN PVOID Block)
 
 $endif (_NTDDK_) $if(_NTIFS_) VOID NTAPI ExInitializePushLock(_Out_ PEX_PUSH_LOCK PushLock)
 
 $endif (_NTIFS_) $if(_WDMDDK_) _IRQL_requires_max_(APC_LEVEL) _Requires_lock_held_(_Global_critical_region_) NTKERNELAPI VOID FASTCALL ExAcquireFastMutexUnsafe(_Inout_ _Requires_lock_not_held_(*_Curr_) _Acquires_lock_(*_Curr_) PFAST_MUTEX FastMutex)
 
 _Requires_lock_held_ (_Global_critical_region_) _Requires_lock_not_held_(*Resource) _When_(Wait!=0
 
_Acquires_exclusive_lock_ Resource _Post_satisfies_ (return==1)) _When_(Wait
 
 __drv_preferredFunction ("ExAllocatePoolWithTag", "No tag interferes with debugging.") __drv_allocatesMem(Mem) _When_((PoolType &PagedPool) !=0
 
 _IRQL_requires_max_ (APC_LEVEL)) _When_((PoolType &PagedPool)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL)) _When_((PoolType &NonPagedPoolMustSucceed) !=0
 
 __drv_reportError ("Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash")) _When_((PoolType &(NonPagedPoolMustSucceed|POOL_RAISE_IF_ALLOCATION_FAILURE)) == 0
 
_Post_maybenull_ _Must_inspect_result_ _When_ ((PoolType &(NonPagedPoolMustSucceed|POOL_RAISE_IF_ALLOCATION_FAILURE)) !=0, _Post_notnull_) _Post_writable_byte_size_(NumberOfBytes) NTKERNELAPI PVOID NTAPI ExAllocatePool(__drv_strictTypeMatch(__drv_typeExpr) _In_ POOL_TYPE PoolType
 
 __drv_preferredFunction ("ExAllocatePoolWithQuotaTag", "No tag interferes with debugging.") __drv_allocatesMem(Mem) _When_((PoolType &PagedPool) !=0
 
_Post_maybenull_ _Must_inspect_result_ _When_ ((PoolType &POOL_QUOTA_FAIL_INSTEAD_OF_RAISE)==0, _Post_notnull_) _Post_writable_byte_size_(NumberOfBytes) NTKERNELAPI PVOID NTAPI ExAllocatePoolWithQuota(__drv_strictTypeMatch(__drv_typeExpr) _In_ POOL_TYPE PoolType
 
 __drv_allocatesMem (Mem) _When_((PoolType &PagedPool) !=0
 
_Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T _In_ ULONG _In_ __drv_strictTypeMatch (__drv_typeExpr) EX_POOL_PRIORITY Priority)
 
 if (Allocation !=NULL)
 
 _IRQL_requires_max_ (DISPATCH_LEVEL) NTKERNELAPI VOID NTAPI ExConvertExclusiveToSharedLite(_Inout_ _Requires_lock_held_(*_Curr_) PERESOURCE Resource)
 
NTKERNELAPI VOID NTAPI ExDeleteNPagedLookasideList (_Inout_ PNPAGED_LOOKASIDE_LIST Lookaside)
 
NTKERNELAPI LARGE_INTEGER NTAPI ExInterlockedAddLargeInteger (_Inout_ PLARGE_INTEGER Addend, _In_ LARGE_INTEGER Increment, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
 
NTKERNELAPI ULONG FASTCALL ExInterlockedAddUlong (_Inout_ PULONG Addend, _In_ ULONG Increment, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
 
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 PLIST_ENTRY FASTCALL ExInterlockedInsertTailList (_Inout_ PLIST_ENTRY ListHead, _Inout_ __drv_aliasesMem PLIST_ENTRY ListEntry, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
 
NTKERNELAPI PSINGLE_LIST_ENTRY FASTCALL ExInterlockedPopEntryList (_Inout_ PSINGLE_LIST_ENTRY ListHead, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
 
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)
 
NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedRemoveHeadList (_Inout_ PLIST_ENTRY ListHead, _Inout_ _Requires_lock_not_held_(*_Curr_) PKSPIN_LOCK Lock)
 
 _IRQL_requires_max_ (PASSIVE_LEVEL) NTKERNELAPI BOOLEAN NTAPI ExIsProcessorFeaturePresent(_In_ ULONG ProcessorFeature)
 Queries information details about a security descriptor.
 
NTKERNELAPI VOID NTAPI ExLocalTimeToSystemTime (_In_ PLARGE_INTEGER LocalTime, _Out_ PLARGE_INTEGER SystemTime)
 
NTKERNELAPI PEX_TIMER NTAPI ExAllocateTimer (_In_opt_ PEXT_CALLBACK Callback, _In_opt_ PVOID CallbackContext, _In_ ULONG Attributes)
 
NTKERNELAPI BOOLEAN NTAPI ExSetTimer (_In_ PEX_TIMER Timer, _In_ LONGLONG DueTime, _In_ LONGLONG Period, _In_opt_ PEXT_SET_PARAMETERS Parameters)
 
NTKERNELAPI BOOLEAN NTAPI ExCancelTimer (_Inout_ PEX_TIMER Timer, _In_opt_ PEXT_CANCEL_PARAMETERS Parameters)
 
NTKERNELAPI BOOLEAN NTAPI ExDeleteTimer (_In_ PEX_TIMER Timer, _In_ BOOLEAN Cancel, _In_ BOOLEAN Wait, _In_opt_ PEXT_DELETE_PARAMETERS Parameters)
 
FORCEINLINE VOID ExInitializeSetTimerParameters (_Out_ PEXT_SET_PARAMETERS Parameters)
 
NTKERNELAPI VOID NTAPI ExSystemTimeToLocalTime (_In_ PLARGE_INTEGER SystemTime, _Out_ PLARGE_INTEGER LocalTime)
 
NTKERNELAPI NTSTATUS NTAPI ExInitializeZone (_Out_ PZONE_HEADER Zone, _In_ ULONG BlockSize, _Inout_ PVOID InitialSegment, _In_ ULONG InitialSegmentSize)
 
NTKERNELAPI VOID FASTCALL ExInitializeRundownProtection (_Out_ PEX_RUNDOWN_REF RunRef)
 
NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtection (_Inout_ PEX_RUNDOWN_REF RunRef)
 
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtection (_Inout_ PEX_RUNDOWN_REF RunRef)
 
NTKERNELAPI VOID FASTCALL ExRundownCompleted (_Out_ PEX_RUNDOWN_REF RunRef)
 
NTKERNELAPI BOOLEAN NTAPI ExVerifySuite (__drv_strictTypeMatch(__drv_typeExpr) _In_ SUITE_TYPE SuiteType)
 
NTKERNELAPI VOID FASTCALL ExWaitForRundownProtectionRelease (_Inout_ PEX_RUNDOWN_REF RunRef)
 
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionEx (_Inout_ PEX_RUNDOWN_REF RunRef, _In_ ULONG Count)
 
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAware (_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
 
NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAwareEx (_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRef, _In_ ULONG Count)
 
NTKERNELAPI VOID FASTCALL ExWaitForRundownProtectionReleaseCacheAware (IN OUT PEX_RUNDOWN_REF_CACHE_AWARE RunRef)
 
NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtectionCacheAware (_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
 
NTKERNELAPI VOID FASTCALL ExRundownCompletedCacheAware (_Inout_ PEX_RUNDOWN_REF_CACHE_AWARE RunRefCacheAware)
 
 __drv_allocatesMem (Mem) _Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) FORCEINLINE PVOID ExAllocateFromLookasideListEx(_Inout_ PLOOKASIDE_LIST_EX Lookaside)
 
_In_ __drv_freesMem (Entry) PVOID Entry)
 
_In_ __drv_freesMem (Mem) PVOID Entry)
 

Variables

_In_ PVOID Entry
 
 else
 
_Acquires_exclusive_lock_ Resource _In_ _Literal_ BOOLEAN Wait
 
_Acquires_shared_lock_ _Curr_ PERESOURCE Resource
 
_Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T NumberOfBytes
 
_Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T _In_ ULONG Tag
 
 Allocation = ExAllocatePoolWithTag(PoolType, NumberOfBytes, Tag)
 
FORCEINLINE _Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T _In_ ULONG _In_ EX_POOL_PRIORITY Priority
 
_In_ POBJECT_ATTRIBUTES ObjectAttributes
 
_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN Create
 
_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ BOOLEAN AllowMultipleCallbacks
 
_In_opt_ PALLOCATE_FUNCTION Allocate
 
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION Free
 
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG Flags
 
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T Size
 
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
 
_In_opt_ PVOID Argument1
 
_In_opt_ PVOID _In_opt_ PVOID Argument2
 
_In_ PCALLBACK_FUNCTION CallbackFunction
 
_In_ PCALLBACK_FUNCTION _In_opt_ PVOID CallbackContext
 
_In_ ERESOURCE_THREAD ResourceThreadId
 
_In_ PVOID OwnerPointer
 
_In_ BOOLEAN SetResolution
 
_Inout_ PVOID Segment
 
_Inout_ PVOID _In_ ULONG SegmentSize
 
_Inout_ PVOID _In_ ULONG _Inout_ _Requires_lock_not_held_ _Curr_ PKSPIN_LOCK Lock
 
_Out_ PBOOLEAN QuotaCharged
 
_Inout_ __drv_aliasesMem PSLIST_ENTRY List
 
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY ListEnd
 
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
 
_Must_inspect_result_ _In_ ULONG PoolTag
 
_In_ SIZE_T RunRefSize
 
_In_opt_ PALLOCATE_FUNCTION_EX _In_opt_ PFREE_FUNCTION_EX _In_ POOL_TYPE PoolType
 

Macro Definition Documentation

◆ EX_TIMER_HIGH_RESOLUTION

#define EX_TIMER_HIGH_RESOLUTION   0x4

Definition at line 955 of file exfuncs.h.

◆ EX_TIMER_NO_WAKE

#define EX_TIMER_NO_WAKE   0x8

Definition at line 956 of file exfuncs.h.

◆ EX_TIMER_NOTIFICATION

#define EX_TIMER_NOTIFICATION   (1UL << 31)

Definition at line 958 of file exfuncs.h.

◆ EX_TIMER_UNLIMITED_TOLERANCE

#define EX_TIMER_UNLIMITED_TOLERANCE   ((LONGLONG)-1)

Definition at line 957 of file exfuncs.h.

◆ ExAcquireResourceExclusive

#define ExAcquireResourceExclusive   ExAcquireResourceExclusiveLite

Definition at line 342 of file exfuncs.h.

◆ ExAcquireResourceShared

#define ExAcquireResourceShared   ExAcquireResourceSharedLite

Definition at line 343 of file exfuncs.h.

◆ ExAcquireSpinLock

#define ExAcquireSpinLock (   Lock,
  OldIrql 
)    KeAcquireSpinLock((Lock), (OldIrql))

◆ ExAcquireSpinLockAtDpcLevel

#define ExAcquireSpinLockAtDpcLevel (   Lock)    KeAcquireSpinLockAtDpcLevel(Lock)

◆ ExAllocatePoolWithQuotaTag

#define ExAllocatePoolWithQuotaTag (   a,
  b,
  c 
)    ExAllocatePoolWithQuota(a,b)

Definition at line 530 of file exfuncs.h.

◆ ExAllocatePoolWithTag

#define ExAllocatePoolWithTag (   a,
  b,
  c 
)    ExAllocatePool(a,b)

Definition at line 554 of file exfuncs.h.

◆ ExConvertExclusiveToShared

#define ExConvertExclusiveToShared   ExConvertExclusiveToSharedLite

Definition at line 344 of file exfuncs.h.

◆ ExDeleteResource

#define ExDeleteResource   ExDeleteResourceLite

Definition at line 345 of file exfuncs.h.

◆ ExDisableResourceBoost

#define ExDisableResourceBoost   ExDisableResourceBoostLite

◆ ExGetCurrentResourceThread

#define ExGetCurrentResourceThread ( )    ((ULONG_PTR)PsGetCurrentThread())

Definition at line 255 of file exfuncs.h.

◆ ExInitializeResource

#define ExInitializeResource   ExInitializeResourceLite

Definition at line 346 of file exfuncs.h.

◆ ExInitializeSListHead

#define ExInitializeSListHead   InitializeSListHead

◆ ExInitializeWorkItem

#define ExInitializeWorkItem (   Item,
  Routine,
  Context 
)
Value:
{ \
(Item)->WorkerRoutine = Routine; \
(Item)->List.Flink = NULL; \
}
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_ PFLT_CALLBACK_DATA _In_ PFLT_DEFERRED_IO_WORKITEM_ROUTINE WorkerRoutine
Definition: fltkernel.h:1977
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:323

Definition at line 265 of file exfuncs.h.

◆ ExInterlockedAddLargeStatistic

#define ExInterlockedAddLargeStatistic (   Addend,
  Increment 
)     (VOID)InterlockedAdd64(&(Addend)->QuadPart, Increment)

Definition at line 850 of file exfuncs.h.

◆ ExInterlockedAllocateFromZone

#define ExInterlockedAllocateFromZone (   Zone,
  Lock 
)     ((PVOID) ExInterlockedPopEntryList(&Zone->FreeList, Lock))

Definition at line 312 of file exfuncs.h.

◆ ExInterlockedCompareExchange64

#define ExInterlockedCompareExchange64 (   Destination,
  Exchange,
  Comperand,
  Lock 
)     InterlockedCompareExchange64(Destination, *(Exchange), *(Comperand))

Definition at line 880 of file exfuncs.h.

◆ ExInterlockedDecrementLong

#define ExInterlockedDecrementLong (   Addend,
  Lock 
)    Exfi386InterlockedDecrementLong(Addend)

◆ ExInterlockedExchangeUlong

#define ExInterlockedExchangeUlong (   Target,
  Value,
  Lock 
)    Exfi386InterlockedExchangeUlong(Target, Value)

◆ ExInterlockedFlushSList

#define ExInterlockedFlushSList (   SListHead)     ExpInterlockedFlushSList(SListHead)

Definition at line 169 of file exfuncs.h.

◆ ExInterlockedFreeToZone

#define ExInterlockedFreeToZone (   Zone,
  Block,
  Lock 
)     ExInterlockedPushEntryList(&(Zone)->FreeList, (PSINGLE_LIST_ENTRY)(Block), Lock)

Definition at line 321 of file exfuncs.h.

◆ ExInterlockedIncrementLong

#define ExInterlockedIncrementLong (   Addend,
  Lock 
)    Exfi386InterlockedIncrementLong(Addend)

◆ ExInterlockedPopEntrySList

#define ExInterlockedPopEntrySList (   SListHead,
  Lock 
)     ExpInterlockedPopEntrySList(SListHead)

Definition at line 166 of file exfuncs.h.

◆ ExInterlockedPushEntrySList

#define ExInterlockedPushEntrySList (   SListHead,
  SListEntry,
  Lock 
)     ExpInterlockedPushEntrySList(SListHead, SListEntry)

Definition at line 163 of file exfuncs.h.

◆ ExIsFullZone

#define ExIsFullZone (   Zone)     ((Zone)->FreeList.Next == (PSINGLE_LIST_ENTRY) NULL)

Definition at line 329 of file exfuncs.h.

◆ ExIsObjectInFirstZoneSegment

#define ExIsObjectInFirstZoneSegment (   Zone,
  Object 
)
Value:
((BOOLEAN)( ((PUCHAR)(Object) >= (PUCHAR)(Zone)->SegmentList.Next) && \
((PUCHAR)(Object) < (PUCHAR)(Zone)->SegmentList.Next + \
(Zone)->TotalSegmentSize)) )
#define BOOLEAN
Definition: pedump.c:73
unsigned char * PUCHAR
Definition: typedefs.h:53
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object

Definition at line 337 of file exfuncs.h.

◆ ExIsResourceAcquired

#define ExIsResourceAcquired   ExIsResourceAcquiredSharedLite

Definition at line 349 of file exfuncs.h.

◆ ExIsResourceAcquiredExclusive

#define ExIsResourceAcquiredExclusive   ExIsResourceAcquiredExclusiveLite

Definition at line 347 of file exfuncs.h.

◆ ExIsResourceAcquiredLite

#define ExIsResourceAcquiredLite   ExIsResourceAcquiredSharedLite

Definition at line 944 of file exfuncs.h.

◆ ExIsResourceAcquiredShared

#define ExIsResourceAcquiredShared   ExIsResourceAcquiredSharedLite

Definition at line 348 of file exfuncs.h.

◆ ExReleaseResource

#define ExReleaseResource (   R)    (ExReleaseResourceLite(R))

Definition at line 257 of file exfuncs.h.

◆ ExReleaseResourceForThread

#define ExReleaseResourceForThread   ExReleaseResourceForThreadLite

Definition at line 350 of file exfuncs.h.

◆ ExReleaseSpinLock

#define ExReleaseSpinLock (   Lock,
  OldIrql 
)    KeReleaseSpinLock((Lock), (OldIrql))

◆ ExReleaseSpinLockFromDpcLevel

#define ExReleaseSpinLockFromDpcLevel (   Lock)    KeReleaseSpinLockFromDpcLevel(Lock)

◆ FLAG_OWNER_POINTER_IS_THREAD

#define FLAG_OWNER_POINTER_IS_THREAD   0x1

Definition at line 1472 of file exfuncs.h.

◆ RESULT_NEGATIVE

#define RESULT_NEGATIVE   1

Definition at line 354 of file exfuncs.h.

◆ RESULT_POSITIVE

#define RESULT_POSITIVE   2

Definition at line 355 of file exfuncs.h.

◆ RESULT_ZERO

#define RESULT_ZERO   0

Definition at line 353 of file exfuncs.h.

Typedef Documentation

◆ INTERLOCKED_RESULT

Enumeration Type Documentation

◆ _INTERLOCKED_RESULT

Enumerator
ResultNegative 
ResultZero 
ResultPositive 

Definition at line 358 of file exfuncs.h.

358 {
#define RESULT_ZERO
Definition: exfuncs.h:353
enum _INTERLOCKED_RESULT INTERLOCKED_RESULT
#define RESULT_NEGATIVE
Definition: exfuncs.h:354
@ ResultPositive
Definition: exfuncs.h:361
@ ResultZero
Definition: exfuncs.h:360
@ ResultNegative
Definition: exfuncs.h:359
#define RESULT_POSITIVE
Definition: exfuncs.h:355

Function Documentation

◆ $endif() [1/3]

$endif ( _NTDDK_  )
Initial value:
== 1 || return == 0)
_When_(return!=0, _Acquires_lock_(*_Curr_))
unsigned char BOOLEAN
#define _Acquires_lock_(lock)
#define _Requires_lock_not_held_(lock)
KSPIN_LOCK * PKSPIN_LOCK
Definition: env_spec_w32.h:73
#define _Inout_
Definition: ms_sal.h:378
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define FASTCALL
Definition: nt_native.h:50
BOOLEAN FASTCALL KeTryToAcquireSpinLockAtDpcLevel(IN OUT PKSPIN_LOCK SpinLock)
Definition: spinlock.c:309
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:228
#define NTKERNELAPI

Definition at line 2494 of file iofuncs.h.

2502{
2503 PriorityInfo->Size = sizeof(IO_PRIORITY_INFO);
2504 PriorityInfo->ThreadPriority = 0xffff;
2505 PriorityInfo->IoPriority = IoPriorityNormal;
2506 PriorityInfo->PagePriority = 0;
2507}
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD _Inout_ PIO_PRIORITY_INFO PriorityInfo
Definition: fltkernel.h:2654
struct _IO_PRIORITY_INFO IO_PRIORITY_INFO
@ IoPriorityNormal
Definition: iotypes.h:1233

◆ $endif() [2/3]

$endif ( _NTIFS_  )
Initial value:
== 0 || return == 1)
#define ExAcquireRundownProtection
Definition: ex.h:135

Definition at line 2825 of file rtlfuncs.h.

2839{
2841 ret.QuadPart = SignedInteger;
2842 return ret;
2843}
return ret
Definition: rtlfuncs.h:3090

◆ $endif() [3/3]

$endif ( _WDMDDK_  )

Definition at line 284 of file exfuncs.h.

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}
if(dx< 0)
Definition: linetemp.h:194
void * PVOID
Definition: typedefs.h:50
_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

◆ $if()

$if ( _WDMDDK_  )

Kernel definitions for ARM64

Kernel definitions for AMD64

Kernel definitions for ARM

Definition at line 1 of file ke.h.

31{
32 ULONG Dummy;
KFLOATING_SAVE
Definition: ke.h:33
* PKFLOATING_SAVE
Definition: ke.h:33
uint32_t ULONG
Definition: typedefs.h:59

◆ __drv_allocatesMem() [1/2]

__drv_allocatesMem ( Mem  )

Definition at line 1405 of file exfuncs.h.

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}
base of all file and directory entries
Definition: entries.h:83
_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
_In_ PVOID Entry
Definition: exfuncs.h:229
#define InterlockedPopEntrySList(SListHead)
Definition: rtlfuncs.h:3392

◆ __drv_allocatesMem() [2/2]

FORCEINLINE __drv_allocatesMem ( Mem  ) &
pure virtual

◆ __drv_freesMem() [1/2]

_In_ __drv_freesMem ( Entry  )

Definition at line 1447 of file exfuncs.h.

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}
FORCEINLINE USHORT ExQueryDepthSList(_In_ PSLIST_HEADER SListHead)
Definition: exfuncs.h:153
#define InterlockedPushEntrySList(SListHead, SListEntry)
Definition: rtlfuncs.h:3389
#define PSLIST_ENTRY
Definition: rtltypes.h:134

◆ __drv_freesMem() [2/2]

_In_ __drv_freesMem ( Mem  )

Definition at line 1523 of file exfuncs.h.

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}
#define ExInterlockedPushEntrySList(SListHead, SListEntry, Lock)
Definition: exfuncs.h:163

◆ __drv_preferredFunction() [1/2]

__drv_preferredFunction ( "ExAllocatePoolWithQuotaTag"  ,
"No tag interferes with debugging."   
) &
pure virtual

◆ __drv_preferredFunction() [2/2]

__drv_preferredFunction ( "ExAllocatePoolWithTag"  ,
"No tag interferes with debugging."   
) &
pure virtual

◆ __drv_reportError()

FORCEINLINE __drv_reportError ( "Must succeed pool allocations are forbidden. " "Allocation failures cause a system crash"  ) & == 0

◆ __drv_strictTypeMatch()

__drv_strictTypeMatch ( __drv_typeExpr  )

◆ _IRQL_requires_()

_IRQL_requires_ ( APC_LEVEL  )

◆ _IRQL_requires_max_() [1/5]

_IRQL_requires_max_ ( APC_LEVEL  )

Definition at line 194 of file exfuncs.h.

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}

◆ _IRQL_requires_max_() [2/5]

_IRQL_requires_max_ ( APC_LEVEL  ) &

◆ _IRQL_requires_max_() [3/5]

_IRQL_requires_max_ ( DISPATCH_LEVEL  )

Definition at line 347 of file hardware.c.

1709{
1710 SendKey();
1712}
static VOID SendKey(VOID)
Definition: hardware.c:332
static VOID Wake(_In_ UCHAR Csn)
Definition: hardware.c:149
_In_ PISAPNP_LOGICAL_DEVICE LogicalDevice
Definition: isapnp.h:399

◆ _IRQL_requires_max_() [4/5]

_IRQL_requires_max_ ( DISPATCH_LEVEL  ) &
pure virtual

◆ _IRQL_requires_max_() [5/5]

_IRQL_requires_max_ ( PASSIVE_LEVEL  )

Queries information details about a security descriptor.

Computes the quota size of a security descriptor.

Assigns a security descriptor for a new object.

An extended function that assigns a security descriptor for a new object.

Frees a security descriptor.

An extended function that sets new information data to a security descriptor.

Modifies some information data about a security descriptor.

Parameters
[in]SecurityInformationSecurity information details to be queried from a security descriptor.
[out]SecurityDescriptorThe returned security descriptor with security information data.
[in,out]LengthThe returned length of a security descriptor.
[in,out]ObjectsSecurityDescriptorThe returned object security descriptor.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the specific information about the security descriptor has been queried. STATUS_BUFFER_TOO_SMALL is returned if the buffer size is too small to contain the queried info about the security descriptor.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
See SeSetSecurityDescriptorInfoEx.
Parameters
[in]ObjectIf specified, the function will use this arbitrary object that points to an object security descriptor.
[in]SecurityInformationSecurity information details to be set.
[in]SecurityDescriptorA security descriptor where its info is to be changed.
[in,out]ObjectsSecurityDescriptorThe returned pointer to security descriptor objects.
[in]AutoInheritFlagsFlags bitmask inheritation, influencing how the security descriptor can be inherited and if it can be in the first place.
[in]PoolTypePool type for the new security descriptor to allocate.
[in]GenericMappingThe generic mapping of access rights masks.
Returns
Returns STATUS_SUCCESS if the operations have been completed without problems and that new info has been set to the security descriptor. STATUS_NO_SECURITY_ON_OBJECT is returned if the object does not have a security descriptor. STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the new security descriptor with new info set has failed.
Parameters
[in]SecurityDescriptorA security descriptor to be freed from memory.
Returns
Returns STATUS_SUCCESS.
Parameters
[in]_ParentDescriptorA security descriptor of the parent object that is being created.
[in]_ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]ObjectTypeThe type of the new object.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]AutoInheritFlagsAutomatic inheritance flags that influence how access control entries within ACLs from security descriptors are inherited.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
Returns STATUS_SUCCESS if the operations have been completed successfully and that the security descriptor has been assigned to the new object. STATUS_NO_TOKEN is returned if the caller hasn't supplied a valid argument to a security subject context. STATUS_INVALID_OWNER is returned if the caller hasn't supplied a parent descriptor that belongs to the main user (owner). STATUS_INVALID_PRIMARY_GROUP is returned by the same reason as with the previous NTSTATUS code. The two NTSTATUS codes are returned if the calling thread stated that the owner and/or group is defaulted to the parent descriptor (SEF_DEFAULT_OWNER_FROM_PARENT and/or SEF_DEFAULT_GROUP_FROM_PARENT respectively). STATUS_INSUFFICIENT_RESOURCES is returned if memory pool allocation for the descriptor buffer has failed. A failure NTSTATUS is returned otherwise.
Parameters
[in]ParentDescriptorA security descriptor of the parent object that is being created.
[in]ExplicitDescriptorAn explicit security descriptor that is applied to a new object.
[out]NewDescriptorThe new allocated security descriptor.
[in]IsDirectoryObjectSet this to TRUE if the newly created object is a directory object, otherwise set this to FALSE.
[in]SubjectContextSecurity subject context of the new object.
[in]GenericMappingGeneric mapping of access mask rights.
[in]PoolTypeThis parameter is unused.
Returns
See SeAssignSecurityEx.
Parameters
[in]SecurityDescriptorA security descriptor.
[out]QuotaInfoSizeThe returned quota size of the given security descriptor to the caller. The function may return 0 to this parameter if the descriptor doesn't have a group or a discretionary access control list (DACL) even.
Returns
Returns STATUS_SUCCESS if the quota size of a security descriptor has been computed successfully. STATUS_UNKNOWN_REVISION is returned if the security descriptor has an invalid revision.

Definition at line 64 of file Messaging.c.

75{
76 PFLT_SERVER_PORT_OBJECT PortObject;
78
79 /* The caller must allow at least one connection */
80 if (MaxConnections == 0)
81 {
83 }
84
85 /* The request must be for a kernel handle */
86 if (!(ObjectAttributes->Attributes & OBJ_KERNEL_HANDLE))
87 {
89 }
90
91 /*
92 * Get rundown protection on the target to stop the owner
93 * from unloading whilst this port object is open. It gets
94 * removed in the FltpServerPortClose callback
95 */
97 if (!NT_SUCCESS(Status))
98 {
99 return Status;
100 }
101
102 /* Create the server port object for this filter */
107 NULL,
109 0,
110 0,
111 (PVOID *)&PortObject);
112 if (NT_SUCCESS(Status))
113 {
114 /* Zero out the struct */
115 RtlZeroMemory(PortObject, sizeof(FLT_SERVER_PORT_OBJECT));
116
117 /* Increment the ref count on the target filter */
119
120 /* Setup the filter port object */
121 PortObject->Filter = Filter;
125 PortObject->Cookie = ServerPortCookie;
126 PortObject->MaxConnections = MaxConnections;
127
128 /* Insert the object */
129 Status = ObInsertObject(PortObject,
130 NULL,
132 0,
133 NULL,
135 if (NT_SUCCESS(Status))
136 {
137 /* Lock the connection list */
139
140 /* Add the new port object to the connection list and increment the count */
143
144 /* Unlock the connection list*/
146 }
147 }
148
149 if (!NT_SUCCESS(Status))
150 {
151 /* Allow the filter to be cleaned up */
153 }
154
155 return Status;
156}
static const INTERNET_PORT ServerPort
Definition: CWebService.cpp:11
POBJECT_TYPE ServerPortObjectType
Definition: Messaging.c:24
VOID FLTAPI FltObjectDereference(_Inout_ PVOID Object)
Definition: Object.c:53
NTSTATUS FLTAPI FltObjectReference(_Inout_ PVOID Object)
Definition: Object.c:41
LONG NTSTATUS
Definition: precomp.h:26
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define InsertTailList(ListHead, Entry)
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY _In_opt_ PFLT_MESSAGE_NOTIFY MessageNotifyCallback
Definition: fltkernel.h:1877
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY ConnectNotifyCallback
Definition: fltkernel.h:1875
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID ServerPortCookie
Definition: fltkernel.h:1874
_Must_inspect_result_ _Outptr_ PFLT_PORT _In_ POBJECT_ATTRIBUTES _In_opt_ PVOID _In_ PFLT_CONNECT_NOTIFY _In_ PFLT_DISCONNECT_NOTIFY DisconnectNotifyCallback
Definition: fltkernel.h:1876
ULONG FltpObjectPointerReference(_In_ PFLT_OBJECT Object)
Definition: Object.c:322
Status
Definition: gdiplustypes.h:25
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
#define OBJ_KERNEL_HANDLE
Definition: winternl.h:231
static LONG MaxConnections
#define KernelMode
Definition: asm.h:34
#define FILE_READ_DATA
Definition: nt_native.h:628
#define STANDARD_RIGHTS_ALL
Definition: nt_native.h:69
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
NTSTATUS NTAPI ObInsertObject(IN PVOID Object, IN PACCESS_STATE AccessState OPTIONAL, IN ACCESS_MASK DesiredAccess, IN ULONG ObjectPointerBias, OUT PVOID *NewObject OPTIONAL, OUT PHANDLE Handle)
Definition: obhandle.c:2935
NTSTATUS NTAPI ObCreateObject(IN KPROCESSOR_MODE ProbeMode OPTIONAL, IN POBJECT_TYPE Type, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN KPROCESSOR_MODE AccessMode, IN OUT PVOID ParseContext OPTIONAL, IN ULONG ObjectSize, IN ULONG PagedPoolCharge OPTIONAL, IN ULONG NonPagedPoolCharge OPTIONAL, OUT PVOID *Object)
Definition: oblife.c:1039
FLT_MUTEX_LIST_HEAD ConnectionList
Definition: fltmgrint.h:121
LIST_ENTRY mList
Definition: fltmgrint.h:56
FAST_MUTEX mLock
Definition: fltmgrint.h:55
PFLT_DISCONNECT_NOTIFY DisconnectNotify
Definition: fltmgrint.h:192
PFLT_MESSAGE_NOTIFY MessageNotify
Definition: fltmgrint.h:193
PFLT_CONNECT_NOTIFY ConnectNotify
Definition: fltmgrint.h:191
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135

◆ _Post_satisfies_()

_Acquires_exclusive_lock_ Resource _Post_satisfies_ ( return  = = 1)

◆ _Requires_lock_held_()

_Requires_lock_held_ ( _Global_critical_region_  )
pure virtual

◆ _Success_()

_Must_inspect_result_ _Success_ ( return!  = FALSE)

◆ _When_() [1/2]

◆ _When_() [2/2]

◆ ExAcquireFastMutex()

FastMutex NTKERNELAPI VOID FASTCALL ExAcquireFastMutex ( _Inout_ _Requires_lock_not_held_ *_Curr_ _Acquires_lock_ *_Curr_ PFAST_MUTEX  FastMutex)

◆ ExAllocateTimer()

NTKERNELAPI PEX_TIMER NTAPI ExAllocateTimer ( _In_opt_ PEXT_CALLBACK  Callback,
_In_opt_ PVOID  CallbackContext,
_In_ ULONG  Attributes 
)

Referenced by ClasspInitializeTimer().

◆ ExCancelTimer()

NTKERNELAPI BOOLEAN NTAPI ExCancelTimer ( _Inout_ PEX_TIMER  Timer,
_In_opt_ PEXT_CANCEL_PARAMETERS  Parameters 
)

Referenced by ClasspDisableTimer().

◆ ExDeleteNPagedLookasideList()

NTKERNELAPI VOID NTAPI ExDeleteNPagedLookasideList ( _Inout_ PNPAGED_LOOKASIDE_LIST  Lookaside)

◆ ExDeleteTimer()

NTKERNELAPI BOOLEAN NTAPI ExDeleteTimer ( _In_ PEX_TIMER  Timer,
_In_ BOOLEAN  Cancel,
_In_ BOOLEAN  Wait,
_In_opt_ PEXT_DELETE_PARAMETERS  Parameters 
)

Referenced by ClasspDeleteTimer().

◆ ExFreeToZone()

static __inline PVOID ExFreeToZone ( IN PZONE_HEADER  Zone,
IN PVOID  Block 
)
static

Definition at line 297 of file exfuncs.h.

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}
struct _SINGLE_LIST_ENTRY * PSINGLE_LIST_ENTRY
Definition: ntbasedef.h:628

Referenced by UDFReleaseCCB(), UDFReleaseIrpContext(), and UDFReleaseObjectName().

◆ ExInitializeFastMutex()

FORCEINLINE VOID ExInitializeFastMutex ( _Out_ PFAST_MUTEX  FastMutex)

Definition at line 274 of file exfuncs.h.

276{
277 FastMutex->Count = FM_LOCK_BIT;
278 FastMutex->Owner = NULL;
279 FastMutex->Contention = 0;
280 KeInitializeEvent(&FastMutex->Event, SynchronizationEvent, FALSE);
281 return;
282}
#define FALSE
Definition: types.h:117
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
@ SynchronizationEvent
#define FM_LOCK_BIT
Definition: iotypes.h:1426

Referenced by __attribute__(), _Requires_lock_held_(), acpi_init(), AcpiOsCreateMutex(), BatteryClassInitializeDevice(), Bus_AddDevice(), CcInitializeCacheManager(), CcPfInitializePrefetcher(), CdCreateFcb(), CdCreateFcbNonpaged(), CdInitializeGlobalData(), CdInitializeVcb(), CmBattCreateFdo(), CmpInitCallback(), CODE_SEG(), CompBattAddDevice(), create_fcb(), CreateClientPort(), CreatePortCCB(), DbgkInitialize(), DriverEntry(), ExeFmtpCreateImageSection(), ExpInitializeWorkerThreads(), ExpInitSystemPhase0(), ExpUuidInitialization(), Ext2AllocateFcb(), Ext2InitializeVcb(), FatCreateDcb(), FatCreateFcb(), FltRegisterFilter(), FsRtlAllocateOplock(), FsRtlInitializeTunnelCache(), FsRtlInsertPerFileObjectContext(), FsRtlNotifyInitializeSync(), GdiProcessCreate(), HalpAcpiTableCacheInit(), InitFontSupport(), MxPagedLockNoDynam::Initialize(), InitializeMessageWaiterQueue(), InitTimerImpl(), IopInitializePlugPlayServices(), KiInitializeKernel(), KiInitSystem(), MmCreateDataFileSection(), MmCreatePhysicalMemorySection(), MmInitSystem(), mount_vol(), nfs41_CreateVNetRoot(), nfs41_UpcallCreate(), NtCreateDebugObject(), PciIdeXAddDevice(), PerformTest(), PspInitializeJobStructures(), RamdiskAddDevice(), RamdiskCreateDiskDevice(), RtlpInitAtomTableLock(), RxAllocateFcbObject(), RxDriverEntry(), RxInitializeBufferingManager(), RxInitializeRegistrationStructures(), split_tree_at(), START_TEST(), TestIrpHandler(), UserProcessCreate(), and vfatNewFCB().

◆ ExInitializeRundownProtection()

NTKERNELAPI VOID FASTCALL ExInitializeRundownProtection ( _Out_ PEX_RUNDOWN_REF  RunRef)

◆ ExInitializeSetTimerParameters()

FORCEINLINE VOID ExInitializeSetTimerParameters ( _Out_ PEXT_SET_PARAMETERS  Parameters)

Definition at line 995 of file exfuncs.h.

997{
998 ASSERT(FALSE);
999}
#define ASSERT(a)
Definition: mode.c:44

Referenced by ClasspEnableTimer(), and ClasspUpdateTimerNoWakeTolerance().

◆ ExInitializeZone()

NTKERNELAPI NTSTATUS NTAPI ExInitializeZone ( _Out_ PZONE_HEADER  Zone,
_In_ ULONG  BlockSize,
_Inout_ PVOID  InitialSegment,
_In_ ULONG  InitialSegmentSize 
)

◆ ExInterlockedAddLargeInteger()

NTKERNELAPI LARGE_INTEGER NTAPI ExInterlockedAddLargeInteger ( _Inout_ PLARGE_INTEGER  Addend,
_In_ LARGE_INTEGER  Increment,
_Inout_ _Requires_lock_not_held_ *_Curr_ PKSPIN_LOCK  Lock 
)

◆ ExInterlockedAddUlong()

NTKERNELAPI ULONG FASTCALL ExInterlockedAddUlong ( _Inout_ PULONG  Addend,
_In_ ULONG  Increment,
_Inout_ _Requires_lock_not_held_ *_Curr_ PKSPIN_LOCK  Lock 
)

◆ ExInterlockedInsertHeadList()

NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedInsertHeadList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY  ListEntry,
_Inout_ _Requires_lock_not_held_ *_Curr_ PKSPIN_LOCK  Lock 
)

◆ ExInterlockedInsertTailList()

NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedInsertTailList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ __drv_aliasesMem PLIST_ENTRY  ListEntry,
_Inout_ _Requires_lock_not_held_ *_Curr_ PKSPIN_LOCK  Lock 
)

◆ ExInterlockedPopEntryList()

◆ ExInterlockedPushEntryList()

◆ ExInterlockedRemoveHeadList()

NTKERNELAPI PLIST_ENTRY FASTCALL ExInterlockedRemoveHeadList ( _Inout_ PLIST_ENTRY  ListHead,
_Inout_ _Requires_lock_not_held_ *_Curr_ PKSPIN_LOCK  Lock 
)

◆ ExLocalTimeToSystemTime()

NTKERNELAPI VOID NTAPI ExLocalTimeToSystemTime ( _In_ PLARGE_INTEGER  LocalTime,
_Out_ PLARGE_INTEGER  SystemTime 
)

◆ ExpInterlockedFlushSList()

NTKERNELAPI PSLIST_ENTRY ExpInterlockedFlushSList ( _Inout_ PSLIST_HEADER  SListHead)

◆ ExpInterlockedPopEntrySList()

NTKERNELAPI PSLIST_ENTRY ExpInterlockedPopEntrySList ( _Inout_ PSLIST_HEADER  SListHead)

◆ ExpInterlockedPushEntrySList()

NTKERNELAPI PSLIST_ENTRY ExpInterlockedPushEntrySList ( _Inout_ PSLIST_HEADER  SListHead,
_Inout_ __drv_aliasesMem PSLIST_ENTRY  SListEntry 
)

◆ ExQueryDepthSList()

FORCEINLINE USHORT ExQueryDepthSList ( _In_ PSLIST_HEADER  SListHead)

Definition at line 153 of file exfuncs.h.

154{
155#ifdef _WIN64
156 return (USHORT)(SListHead->Alignment & 0xffff);
157#else /* !_WIN64 */
158 return (USHORT)SListHead->Depth;
159#endif /* _WIN64 */
160}
unsigned short USHORT
Definition: pedump.c:61

Referenced by __drv_freesMem(), ExFreePoolWithTag(), ExiFreeToPagedLookasideList(), FxFreeToNPagedLookasideList(), FxFreeToNPagedLookasideListNoTracking(), FxFreeToPagedLookasideList(), IoFreeIrp(), IopFreeMiniPacket(), MiAllocatePoolPages(), MiFreePoolPages(), MmCreateKernelStack(), MmDeleteKernelStack(), and ObpFreeCapturedAttributes().

◆ ExReInitializeRundownProtection()

NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtection ( _Inout_ PEX_RUNDOWN_REF  RunRef)

◆ ExReInitializeRundownProtectionCacheAware()

NTKERNELAPI VOID FASTCALL ExReInitializeRundownProtectionCacheAware ( _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE  RunRefCacheAware)

◆ ExReleaseFastMutex()

FastMutex NTKERNELAPI VOID FASTCALL ExReleaseFastMutex ( _Inout_ _Requires_lock_held_ *_Curr_ _Releases_lock_ *_Curr_ PFAST_MUTEX  FastMutex)

◆ ExReleaseRundownProtection()

NTKERNELAPI VOID FASTCALL ExReleaseRundownProtection ( _Inout_ PEX_RUNDOWN_REF  RunRef)

◆ ExReleaseRundownProtectionCacheAware()

NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAware ( _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE  RunRefCacheAware)

Referenced by ClassReleaseRemoveLock().

◆ ExReleaseRundownProtectionCacheAwareEx()

NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionCacheAwareEx ( _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE  RunRef,
_In_ ULONG  Count 
)

◆ ExReleaseRundownProtectionEx()

NTKERNELAPI VOID FASTCALL ExReleaseRundownProtectionEx ( _Inout_ PEX_RUNDOWN_REF  RunRef,
_In_ ULONG  Count 
)

◆ ExRundownCompleted()

NTKERNELAPI VOID FASTCALL ExRundownCompleted ( _Out_ PEX_RUNDOWN_REF  RunRef)

◆ ExRundownCompletedCacheAware()

NTKERNELAPI VOID FASTCALL ExRundownCompletedCacheAware ( _Inout_ PEX_RUNDOWN_REF_CACHE_AWARE  RunRefCacheAware)

◆ ExSetTimer()

NTKERNELAPI BOOLEAN NTAPI ExSetTimer ( _In_ PEX_TIMER  Timer,
_In_ LONGLONG  DueTime,
_In_ LONGLONG  Period,
_In_opt_ PEXT_SET_PARAMETERS  Parameters 
)

◆ ExSystemTimeToLocalTime()

NTKERNELAPI VOID NTAPI ExSystemTimeToLocalTime ( _In_ PLARGE_INTEGER  SystemTime,
_Out_ PLARGE_INTEGER  LocalTime 
)

◆ ExTryToAcquireFastMutex()

_Must_inspect_result_ FastMutex NTKERNELAPI BOOLEAN FASTCALL ExTryToAcquireFastMutex ( _Inout_ _Requires_lock_not_held_ *_Curr_ _Acquires_lock_ *_Curr_ PFAST_MUTEX  FastMutex)

◆ ExVerifySuite()

NTKERNELAPI BOOLEAN NTAPI ExVerifySuite ( __drv_strictTypeMatch(__drv_typeExpr) _In_ SUITE_TYPE  SuiteType)

◆ ExWaitForRundownProtectionRelease()

NTKERNELAPI VOID FASTCALL ExWaitForRundownProtectionRelease ( _Inout_ PEX_RUNDOWN_REF  RunRef)

◆ ExWaitForRundownProtectionReleaseCacheAware()

NTKERNELAPI VOID FASTCALL ExWaitForRundownProtectionReleaseCacheAware ( IN OUT PEX_RUNDOWN_REF_CACHE_AWARE  RunRef)

◆ if() [1/2]

if ( Allocation = NULL)

Definition at line 600 of file exfuncs.h.

600 {
602 }
Allocation
Definition: exfuncs.h:598
_Post_maybenull_ _Must_inspect_result_ _In_ SIZE_T NumberOfBytes
Definition: exfuncs.h:490

◆ if() [2/2]

if ( ExQueryDepthSList &->.ListHead >=Lookaside->L.  Depth)

Definition at line 239 of file exfuncs.h.

239 {
240 Lookaside->L.FreeMisses++;
241 (Lookaside->L.Free)(Entry);
242 } else {

Variable Documentation

◆ Allocate

◆ Allocation

◆ AllowMultipleCallbacks

_In_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ BOOLEAN AllowMultipleCallbacks

Definition at line 750 of file exfuncs.h.

Referenced by Mx::CreateCallback(), and ExCreateCallback().

◆ Argument1

_In_opt_ PVOID Argument1

Definition at line 1009 of file exfuncs.h.

◆ Argument2

Definition at line 1010 of file exfuncs.h.

◆ CallbackContext

Definition at line 1035 of file exfuncs.h.

◆ CallbackFunction

◆ Count

Definition at line 1225 of file exfuncs.h.

◆ Create

Definition at line 749 of file exfuncs.h.

◆ Depth

◆ else

else
Initial value:

Definition at line 242 of file exfuncs.h.

◆ Entry

Initial value:
{
Lookaside->L.TotalFrees++

Definition at line 228 of file exfuncs.h.

Referenced by __drv_allocatesMem(), and _IRQL_requires_max_().

◆ Flags

Definition at line 816 of file exfuncs.h.

◆ Free

_In_opt_ PALLOCATE_FUNCTION_EX _In_opt_ PFREE_FUNCTION_EX Free

Definition at line 815 of file exfuncs.h.

Referenced by AddMRUData(), AddMRUStringA(), COMBOEX_NotifyItem(), COMCTL32_SubclassProc(), create_taskdialog_template(), DATETIME_Destroy(), DATETIME_SetFormatA(), DestroyPropertySheetPage(), DragList_SubclassWindowProc(), DrawStatusTextA(), DSA_DeleteAllItems(), DSA_Destroy(), ElfCreateFile(), ExInitializeNPagedLookasideList(), ExInitializePagedLookasideList(), ExpFreeHandleTableEntry(), Ext2StartReaper(), FindMRUData(), FindMRUStringA(), FreeMRUList(), GetUserAndDomainName(), GROUP_AddGroup(), GROUP_DeleteGroup(), HvFreeCell(), HvInitialize(), ILGlobalFree(), InitFunctionPtrs(), KsAddItemToObjectBag(), KsRemoveItemFromObjectBag(), LISTVIEW_DeleteAllItems(), LISTVIEW_DeleteColumn(), LISTVIEW_DeleteItem(), LISTVIEW_EndEditLabelT(), LISTVIEW_InsertColumnT(), LISTVIEW_InsertItemT(), LISTVIEW_NCCreate(), LISTVIEW_NCDestroy(), MAIN_LoadSettings(), MAIN_SetMainWindowTitle(), Mx::MxInitializeNPagedLookasideList(), Mx::MxInitializePagedLookasideList(), NATIVEFONT_Destroy(), notify_dispinfoT(), notify_forward_header(), PROGRAM_AddProgram(), PROGRAM_DeleteProgram(), PROPSHEET_CleanUp(), PROPSHEET_CreateDialog(), PROPSHEET_CreatePage(), PROPSHEET_InsertPage(), PROPSHEET_RemovePage(), PROPSHEET_SetHeaderSubTitleA(), PROPSHEET_SetHeaderSubTitleW(), PROPSHEET_SetHeaderTitleA(), PROPSHEET_SetHeaderTitleW(), PROPSHEET_SetTitleW(), ranges_add(), ranges_clear(), ranges_clone(), ranges_create(), ranges_del(), ranges_destroy(), CLocalAllocator::Reallocate(), CGlobalAllocator::Reallocate(), ReAllocate(), REBAR_DeleteBand(), REBAR_Destroy(), REBAR_InsertBandT(), REBAR_SetBandInfoT(), RemoveWindowSubclass(), set_string_index(), set_sub_item(), SetWindowSubclass(), START_TEST(), STATUSBAR_SetParts(), STATUSBAR_SetTextT(), STATUSBAR_WMDestroy(), STATUSBAR_WMSetText(), Str_SetPtrA(), Str_SetPtrAtoW(), Str_SetPtrW(), Str_SetPtrWtoA(), SYSLINK_FreeDocItem(), SYSLINK_Render(), SYSLINK_SetItem(), SysLinkWindowProc(), TAB_DeleteItem(), TAB_Destroy(), TAB_InsertItemT(), TAB_SetItemT(), taskdialog_add_buttons(), taskdialog_clear_controls(), TaskDialogIndirect(), Test_GetAvailableVidMem(), textfreeT(), textsetptrT(), TOOLBAR_Cust_RemoveButton(), TOOLBAR_CustomizeDialogProc(), TOOLBAR_DeleteAllButtons(), TOOLBAR_DeleteButton(), TOOLBAR_DeleteImageList(), TOOLBAR_Destroy(), TOOLBAR_InsertImageList(), TOOLBAR_Restore(), TOOLBAR_Save(), TOOLBAR_SaveRestoreA(), TOOLBAR_TTGetDispInfo(), TOOLTIPS_AddToolT(), TOOLTIPS_DelToolT(), TOOLTIPS_Destroy(), TOOLTIPS_SetTitleT(), TOOLTIPS_SetToolInfoT(), TOOLTIPS_UpdateTipTextT(), TRACKBAR_ClearTics(), TRACKBAR_Destroy(), TRACKBAR_RecalculateTics(), and ValidateEditContents().

◆ List

Definition at line 1223 of file exfuncs.h.

◆ ListEnd

◆ Lock

◆ NumberOfBytes

Definition at line 490 of file exfuncs.h.

Referenced by if().

◆ ObjectAttributes

_In_ POBJECT_ATTRIBUTES ObjectAttributes

Definition at line 748 of file exfuncs.h.

◆ OwnerPointer

_In_ PVOID OwnerPointer

Definition at line 1070 of file exfuncs.h.

Referenced by CcSetBcbOwnerPointer(), and ExSetResourceOwnerPointer().

◆ PoolTag

Definition at line 1261 of file exfuncs.h.

◆ PoolType

_In_opt_ PALLOCATE_FUNCTION_EX _In_opt_ PFREE_FUNCTION_EX _In_ POOL_TYPE PoolType

Definition at line 1380 of file exfuncs.h.

◆ Priority

◆ QuotaCharged

_Out_ PBOOLEAN QuotaCharged

Definition at line 1153 of file exfuncs.h.

Referenced by NtAllocateVirtualMemory().

◆ Resource

_Acquires_lock_ _Curr_ PERESOURCE Resource

Definition at line 441 of file exfuncs.h.

◆ ResourceThreadId

_In_ ERESOURCE_THREAD ResourceThreadId

Definition at line 1052 of file exfuncs.h.

Referenced by __RxReleaseFcbForThread(), CcUnpinDataForThread(), and main().

◆ RunRefSize

◆ Segment

_Inout_ PVOID Segment

Definition at line 1101 of file exfuncs.h.

Referenced by _IRQL_requires_max_(), _MmGetPageEntrySectionSegment(), _MmLockSectionSegment(), _MmSetPageEntrySectionSegment(), _MmUnlockSectionSegment(), _When_(), Call16(), CpuExecute(), DbgDumpPage(), DosAllocateMemory(), DosChangeMemoryOwner(), DosCreateDeviceEx(), DosCreatePsp(), DosGetPreviousUmb(), DosInitPsp(), DosInt21h(), DosLinkUmb(), DosLoadDriver(), DosLoadExecutableInternal(), DosResizeHandleTable(), DosResizeMemory(), DosSetProcessContext(), DosUnlinkUmb(), EmsDrvInitialize(), ExExtendZone(), ExInterlockedExtendZone(), FAST486_OPCODE_HANDLER(), Fast486ExecuteAt(), Fast486FpuLoadEnvironment(), Fast486FpuSaveEnvironment(), Fast486SetSegment(), Fast486SetStack(), FindHookableMemory(), FreeSegmentPage(), if(), ImageSectionObjectFromSegment(), InitializeContext(), InitializeContextEx(), MI_MAKE_SUBSECTION_PTE(), MiCacheEvictPages(), MiCreateDataFileMap(), MiCreatePagingFileMap(), MiFreeSegmentPage(), MiGrabDataSection(), MiInitializeSectionPageTable(), MiMapViewOfDataSection(), MiPurgeImageSegment(), MiRosTrimCache(), MiRosUnmapViewOfSection(), MiSegmentDelete(), MiShutdownSystem(), MiWritePage(), MmAccessFaultSectionView(), MmAlterViewAttributes(), MmArePagesResident(), MmCanFileBeTruncated(), MmCommitSessionMappedView(), MmCreateArm3Section(), MmCreateDataFileSection(), MmCreatePhysicalMemorySection(), MmExtendSection(), MmFinalizeSectionPageOut(), MmFlushSegment(), MmFreeCacheSectionPage(), MmFreePageTablesSectionSegment(), MmFreeSectionPage(), MmGetSectionAssociation(), MmMakeDataSectionResident(), MmMakePagesDirty(), MmMakeSegmentResident(), MmMapViewInSystemSpaceEx(), MmMapViewOfSection(), MmMapViewOfSegment(), MmNotPresentFaultSectionView(), MmPageOutCacheSection(), MmPageOutPhysicalAddress(), MmpDeleteSection(), MmpFreePageFileSegment(), MmpPageOutPhysicalAddress(), MmPurgeSegment(), MmQuerySectionView(), MmSetSectionAssociation(), MmSharePageEntrySectionSegment(), MmspPageAlignSegments(), MmUnmapViewOfSegment(), MmUnsharePageEntrySectionSegment(), MmWithdrawSectionPage(), NtCreateProfile(), RtlDestroyHeap(), RtlpCreateUnCommittedRange(), RtlpDeCommitFreeBlock(), RtlpDestroyHeapSegment(), RtlpDestroyUnCommittedRange(), RtlpExtendHeap(), RtlpFindAndCommitPages(), RtlpInitializeHeapSegment(), RtlpInsertFreeBlock(), RtlpInsertUnCommittedPages(), RtlpValidateHeap(), RtlpValidateHeapEntry(), RtlpValidateHeapSegment(), UmaDescReallocate(), UmaDescRelease(), UmaDescReserve(), VdmMapFlat(), x86BiosAllocateBuffer(), x86BiosFreeBuffer(), x86BiosReadMemory(), x86BiosWriteMemory(), and XmsBopProcedure().

◆ SegmentSize

_Inout_ PVOID _In_ ULONG SegmentSize

Definition at line 1102 of file exfuncs.h.

Referenced by ExExtendZone(), ExInterlockedExtendZone(), and RtlDosSearchPath_Ustr().

◆ SetResolution

_In_ BOOLEAN SetResolution

◆ Size

_In_opt_ PALLOCATE_FUNCTION_EX _In_opt_ PFREE_FUNCTION_EX _In_ POOL_TYPE _In_ ULONG _In_ SIZE_T Size

Definition at line 817 of file exfuncs.h.

◆ Tag

_In_opt_ PALLOCATE_FUNCTION_EX _In_opt_ PFREE_FUNCTION_EX _In_ POOL_TYPE _In_ ULONG _In_ SIZE_T _In_ ULONG Tag
Initial value:

Definition at line 527 of file exfuncs.h.

◆ Wait

Definition at line 429 of file exfuncs.h.