ReactOS 0.4.16-dev-336-gb667d82
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)
 Probes and locks virtual pages in memory for the specified process.
 
 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:336

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: no_sal2.h:162
#define _When_(c, a)
Definition: no_sal2.h:38
#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 2842 of file rtlfuncs.h.

2856{
2858 ret.QuadPart = SignedInteger;
2859 return ret;
2860}
return ret
Definition: rtlfuncs.h:3107

◆ $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:3409

◆ __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:3406
#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  )

Probes and locks virtual pages in memory for the specified process.

Parameters
[in,out]MemoryDescriptorListMemory Descriptor List (MDL) containing the buffer to be probed and locked.
[in]ProcessThe process for which the buffer should be probed and locked.
[in]AccessModeAccess mode for probing the pages. Can be KernelMode or UserMode.
[in]LockOperationThe type of the probing and locking operation. Can be IoReadAccess, IoWriteAccess or IoModifyAccess.
Returns
Nothing.
See also
MmProbeAndLockPages
Remarks
Must be called at IRQL <= APC_LEVEL

Probes and locks virtual pages in memory for the specified process.

Frees previously reserved amount of memory in system virtual address space.

Parameters
[in]NumberOfBytesSize, in bytes, of memory to reserve.
[in]PoolTagPool Tag identifying the buffer. Usually consists from 4 characters in reversed order.
Returns
A pointer to the 1st memory block of the reserved buffer in case of success, NULL otherwise.
Remarks
Must be called at IRQL <= APC_LEVEL
Parameters
[in]BaseAddressA pointer to the 1st memory block of the reserved buffer.
[in]PoolTagPool Tag identifying the buffer. Usually consists from 4 characters in reversed order.
Returns
Nothing.
See also
MmAllocateMappingAddress
Remarks
Must be called at IRQL <= 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 common.c.

3587{
3589 BOOLEAN requestSent = FALSE;
3590
3591 BOOLEAN shouldRetry = TRUE;
3592 PCDB cdb = (PCDB)DeviceExtension->PowerContext.Srb.Cdb;
3593 ULONG timeoutValue = DeviceExtension->TimeOutValue;
3594 ULONG retryCount = 1;
3595
3596 // reset some fields.
3597 DeviceExtension->PowerContext.RetryIntervalIn100ns = 0;
3598 status = PowerContextReuseRequest(DeviceExtension);
3599 RequestClearSendTime(DeviceExtension->PowerContext.PowerRequest);
3600
3601 if (!NT_SUCCESS(status))
3602 {
3603 return status;
3604 }
3605
3606 // set proper timeout value and max retry count.
3607 switch(DeviceExtension->PowerContext.PowerChangeState.PowerDown)
3608 {
3612 break;
3613
3615 // Case of issuing SYNC CACHE command. Do not use power irp timeout remaining time in this case
3616 // as we want to give best try on SYNC CACHE command.
3617 retryCount = MAXIMUM_RETRIES;
3618 timeoutValue = DeviceExtension->TimeOutValue;
3619 break;
3620
3622 {
3623 // Case of issuing STOP UNIT command
3624 // As "Imme" bit is set to '1', this command should be completed in short time.
3625 // This command is at low importance, failure of this command has very small impact.
3626 ULONG secondsRemaining = 0;
3627
3628#if (WINVER >= 0x0601)
3629 // this API is introduced in Windows7
3630 PoQueryWatchdogTime(DeviceExtension->LowerPdo, &secondsRemaining);
3631#endif
3632
3633 if (secondsRemaining == 0)
3634 {
3635 // not able to retrieve remaining time from PoQueryWatchdogTime API, use default values.
3636 retryCount = MAXIMUM_RETRIES;
3637 timeoutValue = SCSI_CDROM_TIMEOUT;
3638 }
3639 else
3640 {
3641 // plan to leave about 30 seconds to lower level drivers if possible.
3642 if (secondsRemaining >= 32)
3643 {
3644 retryCount = (secondsRemaining - 30)/SCSI_CDROM_TIMEOUT + 1;
3645 timeoutValue = SCSI_CDROM_TIMEOUT;
3646
3647 if (retryCount > MAXIMUM_RETRIES)
3648 {
3649 retryCount = MAXIMUM_RETRIES;
3650 }
3651
3652 if (retryCount == 1)
3653 {
3654 timeoutValue = secondsRemaining - 30;
3655 }
3656 }
3657 else
3658 {
3659 // issue the command with minimal timeout value and do not retry on it.
3660 retryCount = 1;
3661 timeoutValue = 2;
3662 }
3663 }
3664 }
3665 break;
3666 default:
3667 NT_ASSERT( FALSE );
3669 return status;
3670 }
3671
3672 DeviceExtension->PowerContext.RetryCount = retryCount;
3673
3674 // issue command.
3675 while (shouldRetry)
3676 {
3677
3678 // set SRB fields.
3679 DeviceExtension->PowerContext.Srb.SrbFlags = SRB_FLAGS_NO_DATA_TRANSFER |
3684
3685 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_EXECUTE_SCSI;
3686 DeviceExtension->PowerContext.Srb.TimeOutValue = timeoutValue;
3687
3688 if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceInitial)
3689 {
3690 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_LOCK_QUEUE;
3691 }
3692 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceLocked)
3693 {
3694 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_QUIESCE_DEVICE;
3695 }
3696 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3697 {
3698 // Case of issuing SYNC CACHE command.
3699 DeviceExtension->PowerContext.Srb.CdbLength = 10;
3700 cdb->SYNCHRONIZE_CACHE10.OperationCode = SCSIOP_SYNCHRONIZE_CACHE;
3701 }
3702 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceFlushed)
3703 {
3704 // Case of issuing STOP UNIT command.
3705 DeviceExtension->PowerContext.Srb.CdbLength = 6;
3706 cdb->START_STOP.OperationCode = SCSIOP_START_STOP_UNIT;
3707 cdb->START_STOP.Start = 0;
3708 cdb->START_STOP.Immediate = 1;
3709 }
3710 else if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceStopped)
3711 {
3712 DeviceExtension->PowerContext.Srb.Function = SRB_FUNCTION_UNLOCK_QUEUE;
3713 }
3714
3715 // Set up completion routine and context if requested
3717 {
3718 WdfRequestSetCompletionRoutine(DeviceExtension->PowerContext.PowerRequest,
3720 Context);
3721 }
3722
3723 status = RequestSend(DeviceExtension,
3724 DeviceExtension->PowerContext.PowerRequest,
3725 DeviceExtension->IoTarget,
3727 &requestSent);
3728
3729 if (requestSent)
3730 {
3731 if ((CompletionRoutine == NULL) &&
3732 (SRB_STATUS(DeviceExtension->PowerContext.Srb.SrbStatus) != SRB_STATUS_SUCCESS))
3733 {
3734 TracePrint((TRACE_LEVEL_ERROR,
3735 TRACE_FLAG_POWER,
3736 "%p\tError occured when issuing %s command to device. Srb %p, Status %x\n",
3737 DeviceExtension->PowerContext.PowerRequest,
3738 (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced) ? "SYNC CACHE" : "STOP UNIT",
3739 &DeviceExtension->PowerContext.Srb,
3740 DeviceExtension->PowerContext.Srb.SrbStatus));
3741
3742 NT_ASSERT(!(TEST_FLAG(DeviceExtension->PowerContext.Srb.SrbStatus, SRB_STATUS_QUEUE_FROZEN)));
3743
3744 shouldRetry = RequestSenseInfoInterpret(DeviceExtension,
3745 DeviceExtension->PowerContext.PowerRequest,
3746 &(DeviceExtension->PowerContext.Srb),
3747 retryCount - DeviceExtension->PowerContext.RetryCount,
3748 &status,
3749 &(DeviceExtension->PowerContext.RetryIntervalIn100ns));
3750
3751 if (shouldRetry && (DeviceExtension->PowerContext.RetryCount-- == 0))
3752 {
3753 shouldRetry = FALSE;
3754 }
3755 }
3756 else
3757 {
3758 // succeeded, do not need to retry.
3759 shouldRetry = FALSE;
3760 }
3761
3762 }
3763 else
3764 {
3765 // request failed to be sent
3766 shouldRetry = FALSE;
3767 }
3768
3769 if (shouldRetry)
3770 {
3772 t.QuadPart = -DeviceExtension->PowerContext.RetryIntervalIn100ns;
3774
3775 status = PowerContextReuseRequest(DeviceExtension);
3776 if (!NT_SUCCESS(status))
3777 {
3778 shouldRetry = FALSE;
3779 }
3780 }
3781 }
3782
3783 if (DeviceExtension->PowerContext.PowerChangeState.PowerDown == PowerDownDeviceQuiesced)
3784 {
3785 // record SYNC CACHE command completion time stamp.
3786 KeQueryTickCount(&DeviceExtension->PowerContext.Step1CompleteTime);
3787 }
3788
3789 return status;
3790}
LONG NTSTATUS
Definition: precomp.h:26
#define MAXIMUM_RETRIES
Definition: cdrom.h:124
#define SCSI_CDROM_TIMEOUT
Definition: cdrom.h:680
BOOLEAN RequestSenseInfoInterpret(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ PSCSI_REQUEST_BLOCK Srb, _In_ ULONG RetriedCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIntervalIn100ns)
Definition: sense.c:2467
#define TEST_FLAG(Flags, Bit)
Definition: cdrom.h:1495
@ PowerDownDeviceStopped
Definition: cdrom.h:412
@ PowerDownDeviceQuiesced
Definition: cdrom.h:410
@ PowerDownDeviceInitial
Definition: cdrom.h:408
@ PowerDownDeviceLocked
Definition: cdrom.h:409
@ PowerDownDeviceFlushed
Definition: cdrom.h:411
union _CDB * PCDB
#define SCSIOP_START_STOP_UNIT
Definition: cdrw_hw.h:897
#define SCSIOP_SYNCHRONIZE_CACHE
Definition: cdrw_hw.h:918
#define STATUS_NOT_IMPLEMENTED
Definition: d3dkmdt.h:42
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
NTSTATUS RequestSend(_In_ PCDROM_DEVICE_EXTENSION DeviceExtension, _In_ WDFREQUEST Request, _In_ WDFIOTARGET IoTarget, _In_ ULONG Flags, _Out_opt_ PBOOLEAN RequestSent)
Definition: common.c:3793
VOID RequestClearSendTime(_In_ WDFREQUEST Request)
Definition: common.c:111
#define SRB_FUNCTION_EXECUTE_SCSI
Definition: srb.h:315
#define SRB_FLAGS_NO_DATA_TRANSFER
Definition: srb.h:402
#define SRB_FUNCTION_LOCK_QUEUE
Definition: srb.h:332
#define SRB_FUNCTION_UNLOCK_QUEUE
Definition: srb.h:333
#define SRB_FLAGS_BYPASS_LOCKED_QUEUE
Definition: srb.h:410
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
Definition: srb.h:397
#define SRB_STATUS(Status)
Definition: srb.h:389
#define SRB_STATUS_QUEUE_FROZEN
Definition: srb.h:386
#define SRB_FLAGS_NO_QUEUE_FREEZE
Definition: srb.h:404
#define SRB_STATUS_SUCCESS
Definition: srb.h:341
#define KeDelayExecutionThread(mode, foo, t)
Definition: env_spec_w32.h:484
GLdouble GLdouble t
Definition: gl.h:2047
#define KernelMode
Definition: asm.h:34
#define SRB_FLAGS_D3_PROCESSING
Definition: srb.h:165
#define SRB_FUNCTION_QUIESCE_DEVICE
Definition: srb.h:99
#define KeQueryTickCount(CurrentCount)
Definition: ke.h:43
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
Definition: cdrw_hw.h:28
struct _CDB::_START_STOP START_STOP
struct _CDB::_SYNCHRONIZE_CACHE10 SYNCHRONIZE_CACHE10
@ WDF_REQUEST_SEND_OPTION_SYNCHRONOUS
Definition: wdfrequest.h:109
_In_ WDFREQUEST _In_opt_ PFN_WDF_REQUEST_COMPLETION_ROUTINE CompletionRoutine
Definition: wdfrequest.h:895
#define NT_ASSERT
Definition: rtlfuncs.h:3327

◆ _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
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:36
#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 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:636

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 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(), IntInitWin32PowerManagement(), 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(), DATETIME_Destroy(), DATETIME_SetFormatA(), DestroyPropertySheetPage(), DragList_SubclassWindowProc(), DrawStatusTextA(), DSA_DeleteAllItems(), DSA_Destroy(), ElfCreateFile(), ExInitializeNPagedLookasideList(), ExInitializePagedLookasideList(), ExpFreeHandleTableEntry(), Ext2StartReaper(), ExtractFilesThread(), CCabFolder::ExtractFilesUI(), 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(), PAGER_RestoreText(), 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_button(), taskdialog_add_command_links(), taskdialog_add_radio_buttons(), taskdialog_add_verification_box(), taskdialog_create_label(), taskdialog_destroy(), taskdialog_get_label_size(), taskdialog_layout(), taskdialog_set_element_text(), 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_FreeToolText(), TOOLTIPS_SetTitleT(), 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(), MmCanFileBeTruncated(), MmCommitSessionMappedView(), MmCreateArm3Section(), MmCreateDataFileSection(), MmCreatePhysicalMemorySection(), MmExtendSection(), MmFinalizeSectionPageOut(), MmFlushSegment(), MmFreeCacheSectionPage(), MmFreePageTablesSectionSegment(), MmFreeSectionPage(), MmGetSectionAssociation(), MmIsDataSectionResident(), MmMakeDataSectionResident(), MmMakeSegmentDirty(), 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.