FltAcquirePushLockExclusive routine

The FltAcquirePushLockExclusive routine acquires the given push lock for exclusive access by the calling thread.

Syntax


VOID FltAcquirePushLockExclusive(
  _Inout_ PEX_PUSH_LOCK PushLock
);

Parameters

PushLock [in, out]

Opaque push lock pointer. This pointer must have been initialized by a previous call to FltInitializePushLock.

Return value

None

Remarks

This routine is available on Microsoft Windows XP SP2, Microsoft Windows Server 2003 SP1, and later.

FltAcquirePushLockExclusive acquires the given push lock for exclusive access by the calling thread.

Push locks are similar to ERESOURCE structures (also called resources) in that they can be acquired for shared or exclusive access. For more information about push locks, see the reference entry for FltInitializePushLock.

Unlike ERESOURCE structures, push locks cannot be acquired recursively. If the caller already has acquired the push lock for exclusive or shared access, the thread will hang.

When the caller will be given exclusive access to the given push lock depends on the following:

  • If the push lock is currently unowned, exclusive access is granted immediately to the current thread.

  • If the push lock has already been acquired for exclusive or shared access by another thread, the current thread is put into a wait state until the push lock can be acquired.

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

To release the push lock after it is acquired, call FltReleasePushLock. Every call to FltAcquirePushLockExclusive must be matched by a subsequent call to FltReleasePushLock.

To acquire a push lock for shared access, call FltAcquirePushLockShared.

To initialize a push lock, call FltInitializePushLock.

To delete a push lock, call FltDeletePushLock.

Requirements

Target platform

Universal

Header

Fltkernel.h (include Fltkernel.h)

Library

FltMgr.lib

IRQL

<= APC_LEVEL

See also

FltAcquirePushLockShared
FltDeletePushLock
FltInitializePushLock
FltReleasePushLock
FsRtlEnterFileSystem
KeEnterCriticalRegion

 

 

Send comments about this topic to Microsoft

Show: