ReactOS  0.4.15-dev-3294-ge98684e
FxDpc Class Reference

#include <fxdpc.hpp>

Inheritance diagram for FxDpc:
Collaboration diagram for FxDpc:

Public Member Functions

 FxDpc (__in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxDpc (VOID)
 
KDPCGetDpcPtr (VOID)
 
WDFOBJECT GetObject (VOID)
 
_Must_inspect_result_ NTSTATUS Initialize (__in PWDF_OBJECT_ATTRIBUTES Attributes, __in PWDF_DPC_CONFIG Config, __in FxObject *ParentObject, __out WDFDPC *Dpc)
 
virtual BOOLEAN Dispose (VOID)
 
BOOLEAN Cancel (__in BOOLEAN Wait)
 
VOID DpcHandler (__in PKDPC Dpc, __in PVOID SystemArgument1, __in PVOID SystemArgument2)
 
- Public Member Functions inherited from FxNonPagedObject
 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)
 
_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)
 

Static Public Member Functions

static _Must_inspect_result_ NTSTATUS _Create (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PWDF_DPC_CONFIG Config, __in PWDF_OBJECT_ATTRIBUTES Attributes, __in FxObject *ParentObject, __out WDFDPC *Dpc)
 
- 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)
 

Private Member Functions

VOID FlushAndRundown ()
 

Static Private Member Functions

static VOID WorkItemThunk (PDEVICE_OBJECT DeviceObject, PVOID Context)
 

Private Attributes

KDPC m_Dpc
 
FxObjectm_Object
 
FxCallbackLockm_CallbackLock
 
FxObjectm_CallbackLockObject
 
PFN_WDF_DPC m_Callback
 
BOOLEAN m_RunningDown
 

Static Private Attributes

static KDEFERRED_ROUTINE FxDpcThunk
 

Additional Inherited Members

- 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 63 of file fxdpc.hpp.

Constructor & Destructor Documentation

◆ FxDpc()

FxDpc::FxDpc ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals)

Definition at line 40 of file fxdpc.cpp.

42  :
43  FxNonPagedObject(FX_TYPE_DPC, sizeof(FxDpc), FxDriverGlobals)
44 {
45  m_Object = NULL;
48  m_Callback = NULL;
50 
51  //
52  // Mark the object has having passive level dispose so that KeFlushQueuedDpcs
53  // can be called in Dispose().
54  //
56 
58 }
FxNonPagedObject(__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxdpc.hpp:63
VOID MarkPassiveDispose(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:944
FxObject * m_CallbackLockObject
Definition: fxdpc.hpp:85
#define FALSE
Definition: types.h:117
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1101
FxObject * m_Object
Definition: fxdpc.hpp:73
BOOLEAN m_RunningDown
Definition: fxdpc.hpp:93
PFN_WDF_DPC m_Callback
Definition: fxdpc.hpp:90
#define NULL
Definition: types.h:112
FxCallbackLock * m_CallbackLock
Definition: fxdpc.hpp:79

Referenced by _Create().

◆ ~FxDpc()

FxDpc::~FxDpc ( VOID  )
virtual

Definition at line 61 of file fxdpc.cpp.

62 {
63  //
64  // If this hits, its because someone destroyed the DPC by
65  // removing too many references by mistake without calling WdfObjectDelete
66  //
67  if (m_Object != NULL) {
70  "Destroy WDFDPC %p destroyed without calling WdfObjectDelete, or by"
71  " Framework processing DeviceRemove. Possible reference count "
72  "problem?", GetObjectHandleUnchecked());
74  }
75 }
FxObject * m_Object
Definition: fxdpc.hpp:73
#define TRACINGDEVICE
Definition: dbgtrace.h:58
PVOID __inline GetObjectHandleUnchecked(VOID)
Definition: fxobject.hpp:446
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
FxVerifierDbgBreakPoint(pFxDriverGlobals)

Member Function Documentation

◆ _Create()

_Must_inspect_result_ NTSTATUS FxDpc::_Create ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in PWDF_DPC_CONFIG  Config,
__in PWDF_OBJECT_ATTRIBUTES  Attributes,
__in FxObject ParentObject,
__out WDFDPC *  Dpc 
)
static

Definition at line 79 of file fxdpc.cpp.

101 {
102  FxDpc* pFxDpc;
104 
105  pFxDpc = new(FxDriverGlobals, Attributes) FxDpc(FxDriverGlobals);
106 
107  if (pFxDpc == NULL) {
109  }
110 
112  Attributes,
113  Config,
114  ParentObject,
115  Dpc
116  );
117 
118  if (!NT_SUCCESS(status)) {
120  }
121 
122  return status;
123 }
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
Definition: fxdpc.hpp:63
LONG NTSTATUS
Definition: precomp.h:26
FxDpc(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
Definition: fxdpc.cpp:40
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
FxDpc * pFxDpc
Definition: fxdpcapi.cpp:238
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
_Must_inspect_result_ NTSTATUS Initialize(__in PWDF_OBJECT_ATTRIBUTES Attributes, __in PWDF_DPC_CONFIG Config, __in FxObject *ParentObject, __out WDFDPC *Dpc)
Definition: fxdpc.cpp:127
#define NULL
Definition: types.h:112
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
static SERVICE_STATUS status
Definition: service.c:31
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: ps.c:97

◆ Cancel()

BOOLEAN FxDpc::Cancel ( __in BOOLEAN  Wait)

Definition at line 261 of file fxdpc.cpp.

264 {
265  BOOLEAN result;
266 
268 
269  //
270  // If result == FALSE, then the DPC could already be running.
271  //
272  // If the caller supplies Wait == TRUE, they want to wait and
273  // ensure on return the DPC has finished running.
274  //
275  // The trick here is to implement this without adding execessive
276  // overhead to the "normal" path, such as tracking reference counts,
277  // locking, signaling events to waiting threads, etc.
278  //
279  // So we take the expensive approach for the Cancel call in the
280  // case the caller wants to wait, and misses the DPC window. In
281  // this case we will just do the system wide FlushQueuedDpc's to
282  // ensure the DPC has finished running before return.
283  //
284  if( Wait && !result ) {
285 
287 
289  }
290 
291  return result;
292 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
GLuint64EXT * result
Definition: glext.h:11304
_In_ WDFDPC _In_ BOOLEAN Wait
Definition: wdfdpc.h:167
KDPC * GetDpcPtr(VOID)
Definition: fxdpc.hpp:117
BOOLEAN NTAPI KeRemoveQueueDpc(IN PKDPC Dpc)
Definition: dpc.c:878
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
VOID NTAPI KeFlushQueuedDpcs(VOID)
Definition: dpc.c:919

◆ Dispose()

BOOLEAN FxDpc::Dispose ( VOID  )
virtual

Reimplemented from FxObject.

Definition at line 371 of file fxdpc.cpp.

372 {
373  // MarkPassiveDispose() in Initialize ensures this
375 
377 
378  FlushAndRundown();
379 
380  return TRUE;
381 }
#define KeGetCurrentIrql()
Definition: env_spec_w32.h:706
#define TRUE
Definition: types.h:120
#define ASSERT(a)
Definition: mode.c:44
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
BOOLEAN m_RunningDown
Definition: fxdpc.hpp:93
VOID FlushAndRundown()
Definition: fxdpc.cpp:387

◆ DpcHandler()

VOID FxDpc::DpcHandler ( __in PKDPC  Dpc,
__in PVOID  SystemArgument1,
__in PVOID  SystemArgument2 
)

Definition at line 295 of file fxdpc.cpp.

300 {
304 
306 
307  if (m_Callback != NULL) {
308 
310 
311  if (m_CallbackLock != NULL) {
312  KIRQL irql = 0;
313 
315  m_Callback((WDFDPC)(this->GetObjectHandle()));
316  m_CallbackLock->Unlock(irql);
317  }
318  else {
319  m_Callback((WDFDPC)(this->GetObjectHandle()));
320  }
321  }
322 }
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
virtual void Lock(__out PKIRQL PreviousIrql)=0
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603
_In_opt_ PVOID _In_opt_ PVOID SystemArgument1
Definition: ketypes.h:675
FORCEINLINE VOID FxPerfTraceDpc(_In_ PVOID DriverCallback)
virtual void Unlock(__in KIRQL PreviousIrql)=0
_In_opt_ PVOID _In_opt_ PVOID _In_opt_ PVOID SystemArgument2
Definition: ketypes.h:675
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
PFN_WDF_DPC m_Callback
Definition: fxdpc.hpp:90
#define NULL
Definition: types.h:112
FX_TRACK_DRIVER(fxDriverGlobals)
FxCallbackLock * m_CallbackLock
Definition: fxdpc.hpp:79

◆ FlushAndRundown()

VOID FxDpc::FlushAndRundown ( )
private

Definition at line 387 of file fxdpc.cpp.

388 {
389  FxObject* pObject;
390 
391  //
392  // If we have the KeFlushQueuedDpcs function call it
393  // to ensure the DPC routine is no longer running before
394  // we release the final reference and memory to the framework objects
395  //
397 
398  //
399  // Release our reference count to the associated parent object if present
400  //
401  if (m_Object != NULL) {
402  pObject = m_Object;
403  m_Object = NULL;
404 
405  pObject->RELEASE(this);
406  }
407 
408  //
409  // Perform our final release to ourselves, destroying the FxDpc
410  //
411  RELEASE(this);
412 }
FxObject * pObject
#define RELEASE(_tag)
Definition: fxobject.hpp:50
FxObject * m_Object
Definition: fxdpc.hpp:73
#define NULL
Definition: types.h:112
VOID NTAPI KeFlushQueuedDpcs(VOID)
Definition: dpc.c:919

Referenced by Dispose().

◆ GetDpcPtr()

KDPC* FxDpc::GetDpcPtr ( VOID  )
inline

Definition at line 117 of file fxdpc.hpp.

120  {
121  return &m_Dpc;
122  }
KDPC m_Dpc
Definition: fxdpc.hpp:67

Referenced by Cancel().

◆ GetObject()

WDFOBJECT FxDpc::GetObject ( VOID  )
inline

Definition at line 125 of file fxdpc.hpp.

128  {
129  if (m_Object != NULL) {
130  return m_Object->GetObjectHandle();
131  }
132  else {
133  return NULL;
134  }
135  }
PVOID __inline GetObjectHandle(VOID)
Definition: fxobject.hpp:603
FxObject * m_Object
Definition: fxdpc.hpp:73
#define NULL
Definition: types.h:112

◆ Initialize()

_Must_inspect_result_ NTSTATUS FxDpc::Initialize ( __in PWDF_OBJECT_ATTRIBUTES  Attributes,
__in PWDF_DPC_CONFIG  Config,
__in FxObject ParentObject,
__out WDFDPC *  Dpc 
)

Definition at line 127 of file fxdpc.cpp.

133 {
135  IFxHasCallbacks* pCallbacks;
137  KDPC* pDpc;
138 
140  pDpc = NULL;
141  pCallbacks = NULL;
142 
143  pDpc = &m_Dpc;
144 
145  //
146  // Set user's callback function
147  //
148  m_Callback = Config->EvtDpcFunc;
149 
150  //
151  // Initialize the DPC to point to our thunk
152  //
154  pDpc, // Dpc
155  FxDpcThunk, // DeferredRoutine
156  this // DeferredContext
157  );
158 
159  //
160  // As long as we are associated, the parent object holds a reference
161  // count on the DPC.
162  //
163  // We keep an extra reference count since on Dispose, we wait until
164  // all outstanding DPC's complete before allowing finalization.
165  //
166  // This reference must be taken early before we return any failure,
167  // since Dispose() expects this extra reference, and Dispose() will
168  // be called even if we return a failure status right now.
169  //
170  ADDREF(this);
171 
172  //
173  // DPC's can be parented by, and optionally serialize with an FxDevice or
174  // an FxQueue.
175  //
176  m_DeviceBase = FxDeviceBase::_SearchForDevice(ParentObject, &pCallbacks);
177 
178  if (m_DeviceBase == NULL) {
180  }
181 
182  //
183  // Configure Serialization for the DPC and callbacks on the supplied object
184  //
186  ParentObject,
187  pCallbacks,
188  Config->AutomaticSerialization,
189  FALSE,
192  );
193 
194  if (!NT_SUCCESS(status)) {
196 
197 
198 
199 
200 
201 
204  "ParentObject %p can not automatically synchronize callbacks "
205  "with a DPC since it is configured for passive level callback "
206  "constraints. Set AutomaticSerialization to FALSE. %!STATUS!",
207  Attributes->ParentObject, status);
208  }
209 
210  return status;
211  }
212 
213  //
214  // We automatically synchronize with and reference count
215  // the lifetime of the framework object to prevent any DPC races
216  // that can access the object while it is going away.
217  //
218 
219  //
220  // The caller supplied object is the object the caller wants the
221  // DPC to be associated with, and the framework must ensure this
222  // object remains live until the DPC object is destroyed. Otherwise,
223  // it could access either object context memory, or an object API
224  // on a freed object.
225  //
226  // Due to the locking model of the framework, the lock may actually
227  // be owned by a higher level object as well. This is the lockObject
228  // returned. As long was we are a child of this object, the lockObject
229  // does not need to be dereferenced since it will notify us of Cleanup
230  // before it goes away.
231  //
232 
233  //
234  // Associate the FxDpc with the object. When this object gets deleted or
235  // disposed, it will notify our Dispose function as well.
236  //
237 
238  //
239  // Add a reference to the parent object we are associated with.
240  // We will be notified of Cleanup to release this reference.
241  //
242  ParentObject->ADDREF(this);
243 
244  // Save the ptr to the object the DPC is associated with
245  m_Object = ParentObject;
246 
247  //
248  // Attributes->ParentObject is the same as ParentObject. Since we already
249  // converted it to an object, use that.
250  //
251  status = Commit(Attributes, (WDFOBJECT*)Dpc, ParentObject);
252 
253  if (!NT_SUCCESS(status)) {
254  return status;
255  }
256 
257  return status;
258 }
KDPC m_Dpc
Definition: fxdpc.hpp:67
_Must_inspect_result_ _In_ PWDF_DPC_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFDPC * Dpc
Definition: wdfdpc.h:107
_Must_inspect_result_ NTSTATUS Commit(__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
Definition: fxobject.cpp:904
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)
Definition: fxobject.cpp:1044
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
static FxDeviceBase * _SearchForDevice(__in FxObject *Object, __out_opt IFxHasCallbacks **Callbacks)
FxObject * m_CallbackLockObject
Definition: fxdpc.hpp:85
#define FALSE
Definition: types.h:117
#define ADDREF(_tag)
Definition: fxobject.hpp:49
#define STATUS_WDF_INCOMPATIBLE_EXECUTION_LEVEL
Definition: wdfstatus.h:198
FxObject * m_Object
Definition: fxdpc.hpp:73
#define TRACINGDEVICE
Definition: dbgtrace.h:58
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static KDEFERRED_ROUTINE FxDpcThunk
Definition: fxdpc.hpp:190
Definition: ketypes.h:687
CfxDeviceBase * m_DeviceBase
Definition: fxobject.hpp:328
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_CHILD_LIST_CONFIG Config
Definition: wdfchildlist.h:474
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFN_WDF_DPC m_Callback
Definition: fxdpc.hpp:90
#define NULL
Definition: types.h:112
FxCallbackLock * m_CallbackLock
Definition: fxdpc.hpp:79
VOID NTAPI KeInitializeDpc(IN PKDPC Dpc, IN PKDEFERRED_ROUTINE DeferredRoutine, IN PVOID DeferredContext)
Definition: dpc.c:712
static SERVICE_STATUS status
Definition: service.c:31
_Must_inspect_result_ _In_ WDFDMAENABLER _In_ _In_opt_ PWDF_OBJECT_ATTRIBUTES Attributes
Definition: ps.c:97

Referenced by _Create().

◆ WorkItemThunk()

static VOID FxDpc::WorkItemThunk ( PDEVICE_OBJECT  DeviceObject,
PVOID  Context 
)
staticprivate

Member Data Documentation

◆ FxDpcThunk

VOID FxDpc::FxDpcThunk
staticprivate

Definition at line 190 of file fxdpc.hpp.

Referenced by Initialize().

◆ m_Callback

PFN_WDF_DPC FxDpc::m_Callback
private

Definition at line 90 of file fxdpc.hpp.

Referenced by DpcHandler(), FxDpc(), and Initialize().

◆ m_CallbackLock

FxCallbackLock* FxDpc::m_CallbackLock
private

Definition at line 79 of file fxdpc.hpp.

Referenced by DpcHandler(), FxDpc(), and Initialize().

◆ m_CallbackLockObject

FxObject* FxDpc::m_CallbackLockObject
private

Definition at line 85 of file fxdpc.hpp.

Referenced by FxDpc(), and Initialize().

◆ m_Dpc

KDPC FxDpc::m_Dpc
private

Definition at line 67 of file fxdpc.hpp.

Referenced by GetDpcPtr(), and Initialize().

◆ m_Object

FxObject* FxDpc::m_Object
private

Definition at line 73 of file fxdpc.hpp.

Referenced by FlushAndRundown(), FxDpc(), GetObject(), Initialize(), and ~FxDpc().

◆ m_RunningDown

BOOLEAN FxDpc::m_RunningDown
private

Definition at line 93 of file fxdpc.hpp.

Referenced by Dispose(), and FxDpc().


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