xref: /reactos/sdk/lib/drivers/wdf/shared/core/fxlock.cpp (revision 7b1049c8)
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7     FxLock.cpp
8 
9 Abstract:
10 
11     This module contains the implementation of FxLock
12 
13 Author:
14 
15 
16 
17 Environment:
18 
19     Both kernel and user mode
20 
21 Revision History:
22 
23 
24 --*/
25 
26 #include "coreprivshared.hpp"
27 
28 VOID
29 FxLock::Initialize(
30     __in FxObject * ParentObject
31     )
32 /*++
33 
34 Routine Description:
35     This is called to initialize the verifier with the object type so it can
36     track lock order and sequence.
37 
38 Arguments:
39     ParentObject - the owning object
40 
41 Return Value:
42     None
43 
44   --*/
45 {
46     PFX_DRIVER_GLOBALS pFxDriverGlobals;
47 
48     pFxDriverGlobals = ParentObject->GetDriverGlobals();
49 
50     if (pFxDriverGlobals->FxVerifierLock) {
51         //
52         // Allocation failure is not fatal, we just won't track anything
53         //
54 
55         (void) FxVerifierLock::CreateAndInitialize(&m_Verifier,
56                                                    pFxDriverGlobals,
57                                                    ParentObject);
58     }
59 }
60