ReactOS 0.4.16-dev-340-g0540c21
FxNonPagedObject Class Reference

#include <fxnonpagedobject.hpp>

Inheritance diagram for FxNonPagedObject:
Collaboration diagram for FxNonPagedObject:

Public Member Functions

 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
virtual ~FxNonPagedObject (VOID)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_maxIRQL(DISPATCH_LEVEL) __drv_setsIRQL(DISPATCH_LEVEL) VOID Lock(__out __drv_deref(__drv_savesIRQL) PKIRQL PreviousIrql)
 
 _Releases_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID Unlock(__in __drv_restoresIRQL KIRQL PreviousIrql)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) VOID LockAtDispatch(VOID)
 
 _Requires_lock_held_ (this->m_NPLock.m_Lock) _Releases_lock_(this -> m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID UnlockFromDispatch(VOID)
 
- Public Member Functions inherited from FxObject
PVOID GetCOMWrapper ()
 
void SetCOMWrapper (__drv_aliasesMem PVOID Wrapper)
 
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxObject (VOID)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType Type)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize=0)
 
VOID operator delete (__in PVOID Memory)
 
VOID SetNoContextHeader (VOID)
 
PVOID __inline GetObjectHandle (VOID)
 
__inline FxContextHeaderGetContextHeader (VOID)
 
__inline PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
WDFTYPE GetType (VOID)
 
USHORT GetObjectSize (VOID)
 
LONG GetRefCnt (VOID)
 
FxTagTrackerGetTagTracker (VOID)
 
CfxDeviceGetDevice (VOID)
 
CfxDeviceBaseGetDeviceBase (VOID)
 
VOID SetDeviceBase (__in CfxDeviceBase *DeviceBase)
 
__inline VOID CallCleanup (VOID)
 
ULONG __inline AddRef (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG Release (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG AddRefOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG ReleaseOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual _Must_inspect_result_ NTSTATUS QueryInterface (__in FxQueryInterfaceParams *Params)
 
VOID MarkTraceState (VOID)
 
BOOLEAN __inline IsTraceState (VOID)
 
VOID __inline TraceDroppedEvent (__in FxObjectDroppedEvent Event)
 
VOID MarkPassiveDispose (__in FxObjectLockState State=ObjectLock)
 
VOID MarkPassiveCallbacks (__in FxObjectLockState State=ObjectLock)
 
VOID MarkForceDisposeThread (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsPassiveCallbacks (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsPassiveDispose (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsForceDisposeThread (__in BOOLEAN AcquireLock=TRUE)
 
VOID MarkCommitted (VOID)
 
BOOLEAN IsCommitted (VOID)
 
VOID MarkDisposeOverride (__in FxObjectLockState State=ObjectLock)
 
VOID MarkNoDeleteDDI (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsNoDeleteDDI (VOID)
 
_Must_inspect_result_ NTSTATUS Commit (__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
 
VOID DeleteFromFailedCreate (VOID)
 
VOID ClearEvtCallbacks (VOID)
 
BOOLEAN EarlyDispose (VOID)
 
virtual VOID DeleteObject (VOID)
 
virtual BOOLEAN Dispose (VOID)
 
_Must_inspect_result_ NTSTATUS AssignParentObject (__in FxObject *ParentObject)
 
_Must_inspect_result_ NTSTATUS AddContext (__in FxContextHeader *Header, __in PVOID *Context, __in PWDF_OBJECT_ATTRIBUTES Attributes)
 
_Must_inspect_result_ NTSTATUS RemoveParentAssignment (VOID)
 
_Must_inspect_result_ FxObjectGetParentObjectReferenced (__in PVOID Tag)
 
BOOLEAN IsDisposed (VOID)
 

Private Attributes

MxLock m_NPLock
 

Additional Inherited Members

- Static Public Member Functions inherited from FxObject
static FxObject_FromDisposeEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static FxObject_GetObjectFromHandle (__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
 
static PVOID __inline _ToHandle (__in FxObject *Object)
 
static VOID __inline _ReferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static VOID __inline _DereferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static PVOID _GetDebugBase (__in FxObject *Object)
 
static PFX_POOL_HEADER _CleanupPointer (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Object)
 
static _Must_inspect_result_ NTSTATUS _GetEffectiveLock (__in FxObject *Object, __in_opt IFxHasCallbacks *Callbacks, __in BOOLEAN AutomaticLocking, __in BOOLEAN PassiveCallbacks, __out FxCallbackLock **CallbackLock, __out_opt FxObject **CallbackLockObject)
 
static _Must_inspect_result_ NTSTATUS _ObjectQuery (_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)
 
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
 
   CfxDevice *   m_Device
 
}; 
 

Detailed Description

Definition at line 45 of file fxnonpagedobject.hpp.

Constructor & Destructor Documentation

◆ FxNonPagedObject() [1/2]

FxNonPagedObject::FxNonPagedObject ( __in WDFTYPE  Type,
__in USHORT  Size,
__in PFX_DRIVER_GLOBALS  FxDriverGlobals 
)
inline

Definition at line 52 of file fxnonpagedobject.hpp.

56 :
57 FxObject(Type, Size, FxDriverGlobals)
58 {
59 if (IsDebug()) {
61 //
62 // VerifierLock CreateAndInitialize failure is not fatal,
63 // we just won't track anything
64 //
65 FxVerifierLock * verifierLock = NULL;
68 this);
69 GetDebugExtension()->VerifierLock = verifierLock;
70 }
71 }
72 }
Type
Definition: Type.h:7
FxObjectDebugExtension * GetDebugExtension(VOID)
Definition: fxobject.hpp:401
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
BOOLEAN IsDebug(VOID)
Definition: fxobject.hpp:409
_Must_inspect_result_ static __inline NTSTATUS CreateAndInitialize(__out FxVerifierLock **VerifierLock, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *ParentObject, __in BOOLEAN UseMutex)
#define NULL
Definition: types.h:112
FxVerifierLock * VerifierLock
Definition: fxobject.hpp:210
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

◆ FxNonPagedObject() [2/2]

FxNonPagedObject::FxNonPagedObject ( __in WDFTYPE  Type,
__in USHORT  Size,
__in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in FxObjectType  ObjectType 
)
inline

Definition at line 74 of file fxnonpagedobject.hpp.

79 :
80 FxObject(Type, Size, FxDriverGlobals, ObjectType)
81 {
82 if (IsDebug()) {
84 //
85 // VerifierLock CreateAndInitialize failure is not fatal,
86 // we just won't track anything
87 //
88 FxVerifierLock * verifierLock = NULL;
91 this);
92 GetDebugExtension()->VerifierLock = verifierLock;
93 }
94 }
95 }
ObjectType
Definition: metafile.c:81

◆ ~FxNonPagedObject()

virtual FxNonPagedObject::~FxNonPagedObject ( VOID  )
inlinevirtual

Definition at line 98 of file fxnonpagedobject.hpp.

101 {
102 if (IsDebug()) {
103 FxObjectDebugExtension* pExtension;
104
105 pExtension = GetDebugExtension();
106
107 if (pExtension->VerifierLock != NULL) {
108 delete pExtension->VerifierLock;
109 pExtension->VerifierLock = NULL;
110 }
111 }
112 }

Member Function Documentation

◆ _Acquires_lock_() [1/2]

FxNonPagedObject::_Acquires_lock_ ( this->m_NPLock.  m_Lock)
inline

Definition at line 114 of file fxnonpagedobject.hpp.

121 {
122 if (IsDebug()) {
123 FxObjectDebugExtension* pExtension;
124
125 pExtension = GetDebugExtension();
126
127 if (pExtension->VerifierLock != NULL) {
128 pExtension->VerifierLock->Lock(PreviousIrql, FALSE);
129 //
130 // return here so that we don't acquire the non verified lock
131 // below
132 //
133 return;
134 }
135 }
136
137 m_NPLock.Acquire(PreviousIrql);
138 }
VOID Lock(__out PKIRQL PreviousIrql, __in BOOLEAN AtDpc)
#define FALSE
Definition: types.h:117

◆ _Acquires_lock_() [2/2]

FxNonPagedObject::_Acquires_lock_ ( this->m_NPLock.  m_Lock)
inline

Definition at line 169 of file fxnonpagedobject.hpp.

175 {
176 if (IsDebug()) {
177 FxObjectDebugExtension* pExtension;
178
179 pExtension = GetDebugExtension();
180
181 if (pExtension->VerifierLock != NULL) {
182 KIRQL previousIrql;
183
184 pExtension->VerifierLock->Lock(&previousIrql, TRUE);
185
186 ASSERT(previousIrql == DISPATCH_LEVEL);
187 //
188 // return here so that we don't acquire the non verified lock
189 // below
190 //
191 return;
192 }
193 }
194
195 m_NPLock.AcquireAtDpcLevel();
196 }
#define TRUE
Definition: types.h:120
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define ASSERT(a)
Definition: mode.c:44

◆ _Releases_lock_()

FxNonPagedObject::_Releases_lock_ ( this->m_NPLock.  m_Lock)
inline

Definition at line 140 of file fxnonpagedobject.hpp.

147 {
148 if (IsDebug()) {
149 FxObjectDebugExtension* pExtension;
150
151 pExtension = GetDebugExtension();
152
153 if (pExtension->VerifierLock != NULL) {
154 pExtension->VerifierLock->Unlock(PreviousIrql, FALSE);
155
156 //
157 // return here so that we don't release the non verified lock
158 // below
159 //
160 return;
161 }
162 }
163
164 m_NPLock.Release(PreviousIrql);
165 }
VOID Unlock(__in KIRQL PreviousIrql, __in BOOLEAN AtDpc)

◆ _Requires_lock_held_()

FxNonPagedObject::_Requires_lock_held_ ( this->m_NPLock.  m_Lock) -> m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID UnlockFromDispatch( VOID )
inline

Definition at line 198 of file fxnonpagedobject.hpp.

206 {
207 if (IsDebug()) {
208 FxObjectDebugExtension* pExtension;
209
210 pExtension = GetDebugExtension();
211
212 if (pExtension->VerifierLock != NULL) {
213 pExtension->VerifierLock->Unlock(DISPATCH_LEVEL, TRUE);
214
215 //
216 // return here so that we don't acquire the non verified lock
217 // below
218 //
219 return;
220 }
221 }
222
223 m_NPLock.ReleaseFromDpcLevel();
224 }

Member Data Documentation

◆ m_NPLock

MxLock FxNonPagedObject::m_NPLock
private

Definition at line 49 of file fxnonpagedobject.hpp.

Referenced by _Acquires_lock_(), _Releases_lock_(), and _Requires_lock_held_().


The documentation for this class was generated from the following file: