FltAcquireResourceExclusive - NtDoc

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

VOID FLTAPI FltAcquireResourceExclusive(
  [in/out] PERESOURCE Resource
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-fltkernel-fltacquireresourceexclusive)

Description

The FltAcquireResourceExclusive routine acquires the given resource for exclusive access by the calling thread.

Parameters

Resource [in/out]

A pointer to an opaque ERESOURCE structure. This structure must be allocated by the caller from nonpaged pool and initialized by calling ExInitializeResourceLite or ExReinitializeResourceLite.

Return value

None

Remarks

FltAcquireResourceExclusive acquires the given resource for exclusive access by the calling thread.

The following circumstances determine whether or when the caller is given exclusive access to the given resource:

If two threads each hold a shared lock on the same resource and both attempt to acquire the lock exclusively without releasing their shared lock, they will deadlock. This means that each thread will wait for the other to release its shared hold on the lock, and neither will release its shared hold until the other does.

FltAcquireResourceExclusive is a wrapper for ExAcquireResourceExclusiveLite that disables normal kernel APC delivery.

Because FltAcquireResourceExclusive disables normal kernel APC delivery, it is not necessary to call KeEnterCriticalRegion or FsRtlEnterFileSystem before calling FltAcquireResourceExclusive.

To release the resource after it is acquired, call FltReleaseResource. Every successful call to FltAcquireResourceExclusive must be matched by a subsequent call to FltReleaseResource.

To acquire a resource for shared access, call FltAcquireResourceShared.

To delete a resource from the system's resource list, call ExDeleteResourceLite.

To initialize a resource for reuse, call ExReinitializeResourceLite.

For more information about ERESOURCE structures, see Introduction to ERESOURCE Routines.