ExAcquireResourceSharedLite - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// wdm.h

BOOLEAN ExAcquireResourceSharedLite(
  [in, out] PERESOURCE Resource,
  [in]      BOOLEAN    Wait
);

View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-wdm-exacquireresourcesharedlite)

ExAcquireResourceSharedLite function

Description

The ExAcquireResourceSharedLite routine acquires the given resource for shared access by the calling thread.

Parameters

Resource [in, out]

A pointer to the resource to acquire.

Wait [in]

Specifies the routine's behavior whenever the resource cannot be acquired immediately. If TRUE, the caller is put into a wait state until the resource can be acquired. If FALSE, the routine immediately returns, regardless of whether the resource can be acquired.

Return value

The caller can release the resource by calling either ExReleaseResourceLite or ExReleaseResourceForThreadLite.

ExAcquireResourceSharedLite returns TRUE if (or when) the resource is acquired. This routine returns FALSE if the input Wait is FALSE and shared access cannot be granted immediately.

Remarks

Whether or when the caller is given shared access to the given resource depends on the following:

Normal kernel APC delivery must be disabled before calling this routine. Disable normal kernel APC delivery by calling KeEnterCriticalRegion. Delivery must remain disabled until the resource is released, at which point it can be reenabled by calling KeLeaveCriticalRegion. For more information, see Disabling APCs.

See also

ExAcquireResourceExclusiveLite

ExAcquireSharedStarveExclusive

ExAcquireSharedWaitForExclusive

ExConvertExclusiveToSharedLite

ExGetExclusiveWaiterCount

ExGetSharedWaiterCount

ExInitializeResourceLite

ExIsResourceAcquiredSharedLite

ExReinitializeResourceLite

ExReleaseResourceForThreadLite