ExInitializeResourceLite

NTSTATUS
    ExInitializeResourceLite(

        IN PERESOURCE  Resource
        );

ExInitializeResourceLite initializes a resource variable.

Parameters

Resource
Points to the caller-supplied storage, which must be at least sizeof(ERESOURCE), for the resource variable being initialized.

Return Value

ExInitializeResourceLite returns STATUS_SUCCESS.

Comments

The storage for ERESOURCE must not be allocated from paged pool.

The resource variable can be used for synchronization by a set of threads. Although the caller provides the storage for the resource variable, the ERESOURCE structure is opaque: that is, its members are reserved for system use.

Call ExDeleteResourceLite before freeing the memory for the resource.

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

See Also

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