Previous Next

ExGetSharedWaiterCount

The ExGetSharedWaiterCount routine returns the number of waiters on shared access to a given resource.

ULONG 
  ExGetSharedWaiterCount(
    IN PERESOURCE  Resource
    );

Parameters

Resource
Pointer to the resource to be tested.

Headers

Declared in ntddk.h. Include ntddk.h.

Return Value

ExGetSharedWaiterCount returns the number of threads currently waiting to acquire the given resource for shared access.

Comments

ExGetSharedWaiterCount can be called to get an estimate of how many other threads might be waiting to read the data protected by a particular resource variable. The caller cannot assume that the returned value remains constant for any particular interval.

Callers of ExGetSharedWaiterCount can be running at IRQL <= DISPATCH_LEVEL.

See Also

ExAcquireResourceExclusiveLite, ExAcquireResourceSharedLite, ExAcquireSharedStarveExclusive, ExAcquireSharedWaitForExclusive, ExGetExclusiveWaiterCount, ExReleaseResourceForThreadLite