57 Lock->Dbg.Signature =
'COLR';
62 Lock->Dbg.LowMemoryCount = 0;
68 Lock->Common.IoCount = 1;
96 if (!
Lock->Common.Removed)
101 ASSERT(
Lock->Dbg.HighWatermark == 0 || LockValue <= Lock->
Dbg.HighWatermark);
121 TrackingBlock->
Next =
Lock->Dbg.Blocks;
122 Lock->Dbg.Blocks = TrackingBlock;
174 TrackingBlock =
Lock->Dbg.Blocks;
175 TrackingBlockLink = &(
Lock->Dbg.Blocks);
176 while (TrackingBlock !=
NULL)
179 if (
Lock->Dbg.MaxLockedTicks &&
182 DPRINT(
"Lock %#08lx (with tag %#08lx) was supposed to be held at max %I64d ticks but lasted longer\n",
183 Lock, TrackingBlock->
Tag,
Lock->Dbg.MaxLockedTicks);
184 DPRINT(
"Lock was acquired in file %s at line %lu\n", TrackingBlock->
File, TrackingBlock->
Line);
189 if ((TagFound ==
FALSE) && (TrackingBlock->
Tag ==
Tag))
193 *TrackingBlockLink = TrackingBlock->
Next;
195 TrackingBlock = *TrackingBlockLink;
200 TrackingBlockLink = &(TrackingBlock->
Next);
201 TrackingBlock = TrackingBlock->
Next;
209 if (TagFound ==
FALSE)
218 DPRINT(
"Failed finding block for tag: %#08lx\n",
Tag);
277 TrackingBlock =
Lock->Dbg.Blocks;
279 if (TrackingBlock->
Tag !=
Tag)
281 DPRINT(
"Last tracking block tag invalid! Expected: %p, having: %p\n",
Tag, TrackingBlock->
Tag);
#define InterlockedIncrement
#define InterlockedDecrement
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeReleaseSpinLock(sl, irql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define KeInitializeSpinLock(sl)
#define ExFreePoolWithTag(_P, _T)
struct _EXTENDED_IO_REMOVE_LOCK * PEXTENDED_IO_REMOVE_LOCK
ULONG NTAPI KeQueryTimeIncrement(VOID)
#define STATUS_DELETE_PENDING
struct _IO_REMOVE_LOCK_TRACKING_BLOCK IO_REMOVE_LOCK_TRACKING_BLOCK
VOID NTAPI IoInitializeRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN ULONG AllocateTag, IN ULONG MaxLockedMinutes, IN ULONG HighWatermark, IN ULONG RemlockSize)
NTSTATUS NTAPI IoAcquireRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN OPTIONAL PVOID Tag, IN LPCSTR File, IN ULONG Line, IN ULONG RemlockSize)
VOID NTAPI IoReleaseRemoveLockAndWaitEx(IN PIO_REMOVE_LOCK RemoveLock, IN PVOID Tag, IN ULONG RemlockSize)
VOID NTAPI IoReleaseRemoveLockEx(IN PIO_REMOVE_LOCK RemoveLock, IN PVOID Tag, IN ULONG RemlockSize)
#define KeQueryTickCount(CurrentCount)
PULONG MinorVersion OPTIONAL
PIO_REMOVE_LOCK_TRACKING_BLOCK Next
#define RtlZeroMemory(Destination, Length)
_Must_inspect_result_ _In_ WDFDEVICE _In_ BOOLEAN _In_opt_ PVOID Tag
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
_In_opt_ PVOID _In_ PCSTR _In_ ULONG _In_ ULONG RemlockSize
_In_ ULONG _In_ ULONG _In_ ULONG HighWatermark
struct _IO_REMOVE_LOCK_COMMON_BLOCK IO_REMOVE_LOCK_COMMON_BLOCK
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql