ReactOS
0.4.16-dev-329-g9223134
fxpagedobject.hpp
Go to the documentation of this file.
1
/*++
2
3
Copyright (c) Microsoft Corporation
4
5
Module Name:
6
7
FxPagedObject.hpp
8
9
Abstract:
10
11
This module defines the abstract FxPagedObject class.
12
13
Author:
14
15
16
17
--*/
18
19
#ifndef _FXPAGEDOBJECT_H_
20
#define _FXPAGEDOBJECT_H_
21
22
class
FxPagedObject
:
public
FxObject
23
{
24
private
:
25
MxPagedLock
*
m_Lock
;
26
27
public
:
28
29
FxPagedObject
(
30
__in
WDFTYPE
Type
,
31
__in
USHORT
Size
,
32
__in
PFX_DRIVER_GLOBALS
FxDriverGlobals
33
) :
34
FxObject
(
Type
,
Size
, FxDriverGlobals)
35
{
36
m_Lock
=
NULL
;
37
38
// no need to hold the lock while the object is being constructed
39
MarkPassiveCallbacks
(
ObjectDoNotLock
);
40
}
41
42
virtual
43
~FxPagedObject
(
44
VOID
45
)
46
{
47
if
(
m_Lock
!=
NULL
) {
48
FxPoolFree
(
m_Lock
);
49
m_Lock
=
NULL
;
50
}
51
}
52
53
VOID
54
Lock
(
55
VOID
56
)
57
{
58
m_Lock
->Acquire();
59
}
60
61
VOID
62
Unlock
(
63
VOID
64
)
65
{
66
m_Lock
->Release();
67
}
68
69
_Must_inspect_result_
70
NTSTATUS
71
Initialize
(
72
VOID
73
)
74
{
75
PFX_DRIVER_GLOBALS
fxDriverGlobals
;
76
77
fxDriverGlobals
=
GetDriverGlobals
();
78
m_Lock
= (
MxPagedLock
*) FxPoolAllocate(
fxDriverGlobals
,
79
NonPagedPool
,
80
sizeof
(
MxPagedLock
));
81
if
(
m_Lock
!=
NULL
) {
82
return
m_Lock
->
Initialize
();
83
}
84
else
{
85
return
STATUS_INSUFFICIENT_RESOURCES
;
86
}
87
}
88
};
89
90
#endif
// _FXPAGEDOBJECT_H_
Type
Type
Definition:
Type.h:7
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
FxObject
Definition:
fxobject.hpp:232
FxObject::GetDriverGlobals
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition:
fxobject.hpp:734
FxObject::MarkPassiveCallbacks
VOID MarkPassiveCallbacks(__in FxObjectLockState State=ObjectLock)
Definition:
fxobject.hpp:972
FxPagedObject
Definition:
fxpagedobject.hpp:23
FxPagedObject::FxPagedObject
FxPagedObject(__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition:
fxpagedobject.hpp:29
FxPagedObject::Unlock
VOID Unlock(VOID)
Definition:
fxpagedobject.hpp:62
FxPagedObject::Lock
VOID Lock(VOID)
Definition:
fxpagedobject.hpp:54
FxPagedObject::m_Lock
MxPagedLock * m_Lock
Definition:
fxpagedobject.hpp:25
FxPagedObject::Initialize
_Must_inspect_result_ NTSTATUS Initialize(VOID)
Definition:
fxpagedobject.hpp:71
FxPagedObject::~FxPagedObject
virtual ~FxPagedObject(VOID)
Definition:
fxpagedobject.hpp:43
MxPagedLockNoDynam::Initialize
_Must_inspect_result_ __inline NTSTATUS Initialize()
Definition:
mxpagedlockkm.h:52
MxPagedLock
Definition:
mxpagedlock.h:95
__in
#define __in
Definition:
dbghelp.h:35
NULL
#define NULL
Definition:
types.h:112
NonPagedPool
#define NonPagedPool
Definition:
env_spec_w32.h:307
fxDriverGlobals
PFX_DRIVER_GLOBALS fxDriverGlobals
Definition:
fxcxdeviceinitapi.cpp:83
ObjectDoNotLock
@ ObjectDoNotLock
Definition:
fxobject.hpp:128
FxPoolFree
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition:
wdfpool.cpp:361
WDFTYPE
USHORT WDFTYPE
Definition:
fxtypes.h:29
void
Definition:
nsiface.idl:2307
_Must_inspect_result_
#define _Must_inspect_result_
Definition:
no_sal2.h:62
USHORT
unsigned short USHORT
Definition:
pedump.c:61
_FX_DRIVER_GLOBALS
Definition:
fxglobals.h:165
STATUS_INSUFFICIENT_RESOURCES
#define STATUS_INSUFFICIENT_RESOURCES
Definition:
udferr_usr.h:158
Size
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition:
wdfdevice.h:4533
sdk
lib
drivers
wdf
shared
inc
private
common
fxpagedobject.hpp
Generated on Sun Dec 8 2024 06:13:56 for ReactOS by
1.9.6