ExReinitializeResourceLite

VOID
ExReinitializeResourceLite(

IN PERESOURCE Resource
)

ExReinitializeResourceLite reinitializes an existing resource variable.

Parameters

Resource

Points to the caller supplied resource variable to be reinitialized.

Return Value

ExReinitializeResourceLite returns STATUS_SUCCESS.

Comments

With a single call to ExReinitializeResource, a driver writer can replace three calls: one to ExDeleteResourceLite, another to ExAllocatePool, and a third to ExInitializeResourceLite.  As contention for a resource variable increases, memory is dynamically allocated and attached to the resource in order to track this contention. As an optimization, ExReinitializeResourceLite retains and zeroes this previously allocated memory.

The ERESOURCE structure is opaque: that is, the members are reserved for system use.

Callers of ExReinitializeResourceLite must be running at IRQL <= DISPATCH_LEVEL.

See Also

ExAcquireResourceExclusiveLite, ExAcquireResourceSharedLite, ExInitializeResourceLite, ExDeleteResourceLite, ExAcquireSharedStarveExclusive, ExAcquireSharedWaitForExclusive, ExConvertExclusiveToSharedLite, ExIsResourceAcquiredExclusiveLite, ExIsResourceAcquiredSharedLite, ExReleaseResourceForThreadLite, ExTryToAcquireResourceExclusiveLite