KeAcquireGuardedMutexUnsafe 函式 (wdm.h)

KeAcquireGuardedMutexUnsafe 會在受防護區域內取得受防護的 Mutex。

語法

void KeAcquireGuardedMutexUnsafe(
  PKGUARDED_MUTEX FastMutex
);

參數

FastMutex

[in, out]受防護 Mutex 之KGUARDED_MUTEX 結構的指標。

傳回值

備註

使用 KeReleaseGuardedMutexUnsafe 釋放使用 KeAcquireMutexUnsafe 取得的受防護 Mutex。

KeAcquireGuardedMutexUnsafe 不會隱含地將呼叫線程放在受防護區域內。 包含在 KeAcquireGuardedMutexUnsafe/KeReleaseGuardedMutexUnsafe 配對內的程式代碼必須在 IRQL = APC_LEVEL或受防護區域內執行。 對於不保證在受防護區域內執行的程序代碼,請使用 KeAcquireGuardedMutexKeReleaseGuardedMutexUnsafe

無法以遞歸方式取得受防護 Mutex:如果線程在呼叫 KeAcquireGuardedMutexUnsafe 時已經持有 mutex,線程將會死結。

如需受防護 Mutex 的詳細資訊,請參閱 Fast Mutexes 和 Guarded Mutex。

規格需求

需求
最低支援的伺服器 Windows Server 2003
標頭 wdm.h
IRQL <= APC_LEVEL
DDI 合規性規則 HwStorPortProhibitedDIS (storport) IrqlKeApcLte1 (wdm)

另請參閱

KGUARDED_MUTEX

KeReleaseGuardedMutexUnsafe