ExAcquireResourceExclusiveLite
BOOLEAN
ExAcquireResourceExclusiveLite(
IN PERESOURCE Resource,
IN BOOLEAN Wait
);
ExAcquireResourceExclusive acquires the given resource for exclusive access by the calling thread.
Parameters
Resource
Points to the resource to acquire.
Wait
Is set to TRUE if the caller should be put into a wait state until the resource can be acquired if it cannot be acquired immediately.
Return Value
ExAcquireResourceExclusiveLite returns TRUE if the resource is acquired. This routine returns FALSE if the input Wait is FALSE and exclusive access cannot be granted immediately.
Comments
For better performance, call ExTryToAcquireResourceExclusiveLite, rather than calling ExAcquireResourceExclusiveLite with Wait set to FALSE.
Callers of ExAcquireResourceExclusiveLite must be running at IRQL < DISPATCH_LEVEL.
See Also
ExAcquireResourceSharedLite, ExGetExclusiveWaiterCount, ExGetSharedWaiterCount, ExInitializeResourceLite, ExReinitializeResourceLite, ExIsResourceAcquiredExclusiveLite, ExReleaseResourceForThreadLite, ExTryToAcquireResourceExclusiveLite