ntoskrnl.exe: Implement ExGetExclusiveWaiterCount().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-04-09 23:41:07 -05:00 committed by Alexandre Julliard
parent 810227f72e
commit 631473ffd9
3 changed files with 21 additions and 1 deletions

View File

@ -146,7 +146,7 @@
@ stub ExFreeToPagedLookasideList
@ stub ExGetCurrentProcessorCounts
@ stub ExGetCurrentProcessorCpuUsage
@ stub ExGetExclusiveWaiterCount
@ stdcall ExGetExclusiveWaiterCount(ptr)
@ stub ExGetPreviousMode
@ stub ExGetSharedWaiterCount
@ stdcall ExInitializeNPagedLookasideList(ptr ptr ptr long long long long)

View File

@ -1087,3 +1087,22 @@ void WINAPI ExReleaseResourceLite( ERESOURCE *resource )
{
ExReleaseResourceForThreadLite( resource, (ERESOURCE_THREAD)KeGetCurrentThread() );
}
/***********************************************************************
* ExGetExclusiveWaiterCount (NTOSKRNL.EXE.@)
*/
ULONG WINAPI ExGetExclusiveWaiterCount( ERESOURCE *resource )
{
ULONG count;
KIRQL irql;
TRACE("resource %p.\n", resource);
KeAcquireSpinLock( &resource->SpinLock, &irql );
count = resource->NumberOfExclusiveWaiters;
KeReleaseSpinLock( &resource->SpinLock, irql );
return count;
}

View File

@ -1524,6 +1524,7 @@ void WINAPI ExDeleteNPagedLookasideList(PNPAGED_LOOKASIDE_LIST);
NTSTATUS WINAPI ExDeleteResourceLite(ERESOURCE*);
void WINAPI ExFreePool(PVOID);
void WINAPI ExFreePoolWithTag(PVOID,ULONG);
ULONG WINAPI ExGetExclusiveWaiterCount(ERESOURCE*);
void WINAPI ExInitializeNPagedLookasideList(PNPAGED_LOOKASIDE_LIST,PALLOCATE_FUNCTION,PFREE_FUNCTION,ULONG,SIZE_T,ULONG,USHORT);
NTSTATUS WINAPI ExInitializeResourceLite(ERESOURCE*);
PSLIST_ENTRY WINAPI ExInterlockedPopEntrySList(PSLIST_HEADER,PKSPIN_LOCK);