mirror of
https://github.com/reactos/reactos.git
synced 2024-08-05 11:00:55 +00:00
8a978a179f
Takern from Microsoft GitHub repo:
d9c6040fe9
Licensed under MIT
60 lines
985 B
C++
60 lines
985 B
C++
/*++
|
|
|
|
Copyright (c) Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
FxLock.cpp
|
|
|
|
Abstract:
|
|
|
|
This module contains the implementation of FxLock
|
|
|
|
Author:
|
|
|
|
|
|
|
|
Environment:
|
|
|
|
Both kernel and user mode
|
|
|
|
Revision History:
|
|
|
|
|
|
--*/
|
|
|
|
#include "coreprivshared.hpp"
|
|
|
|
VOID
|
|
FxLock::Initialize(
|
|
__in FxObject * ParentObject
|
|
)
|
|
/*++
|
|
|
|
Routine Description:
|
|
This is called to initialize the verifier with the object type so it can
|
|
track lock order and sequence.
|
|
|
|
Arguments:
|
|
ParentObject - the owning object
|
|
|
|
Return Value:
|
|
None
|
|
|
|
--*/
|
|
{
|
|
PFX_DRIVER_GLOBALS pFxDriverGlobals;
|
|
|
|
pFxDriverGlobals = ParentObject->GetDriverGlobals();
|
|
|
|
if (pFxDriverGlobals->FxVerifierLock) {
|
|
//
|
|
// Allocation failure is not fatal, we just won't track anything
|
|
//
|
|
|
|
(void) FxVerifierLock::CreateAndInitialize(&m_Verifier,
|
|
pFxDriverGlobals,
|
|
ParentObject);
|
|
}
|
|
}
|