ReactOS  0.4.15-dev-5122-g72bdbdd
FxSpinLock Class Reference

#include <fxspinlock.hpp>

Inheritance diagram for FxSpinLock:
Collaboration diagram for FxSpinLock:

Public Member Functions

 FxSpinLock (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in USHORT ExtraSize)
 __drv_raisesIRQL (DISPATCH_LEVEL) __drv_maxIRQL(DISPATCH_LEVEL) VOID AcquireLock(__in PVOID CallersAddress)
 __drv_requiresIRQL (DISPATCH_LEVEL) VOID ReleaseLock(VOID)
MdLockGetLock (VOID)
VOID SetInterruptSpinLock (VOID)
BOOLEAN IsInterruptLock (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)
USHORT GetObjectSize (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)
_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)

Protected Member Functions

- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
FxObjectDebugExtensionGetDebugExtension (VOID)
VOID AllocateTagTracker (__in WDFTYPE Type)
virtual VOID SelfDestruct (VOID)
PVOID __inline GetObjectHandleUnchecked (VOID)
VOID __inline DestroyChildren (VOID)
VOID DeleteEarlyDisposedObject (VOID)

Protected Attributes

MxLock m_SpinLock
KIRQL m_Irql
BOOLEAN m_InterruptLock
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
   CfxDevice *   m_Device

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)
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)

Detailed Description

Definition at line 41 of file fxspinlock.hpp.

Constructor & Destructor Documentation

◆ FxSpinLock()

FxSpinLock::FxSpinLock ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in USHORT  ExtraSize 

Definition at line 32 of file fxspinlock.cpp.

35  :
36  FxObject(FX_TYPE_SPIN_LOCK, COMPUTE_OBJECT_SIZE(sizeof(FxSpinLock), ExtraSize), FxDriverGlobals)
37 {
40  m_Irql = 0;
43  pHistory = GetHistory();
45  if (pHistory != NULL) {
46  RtlZeroMemory(pHistory, sizeof(FX_SPIN_LOCK_HISTORY));
48  pHistory->CurrentHistory = &pHistory->History[0];
49  }
50 }
Definition: fxspinlock.hpp:34
KIRQL m_Irql
Definition: fxspinlock.hpp:109
BOOLEAN m_InterruptLock
Definition: fxspinlock.hpp:118
#define FALSE
Definition: types.h:117
#define COMPUTE_OBJECT_SIZE(_rawObjectSize, _extraSize)
Definition: fxhandle.h:107
Definition: fxobject.hpp:333
Definition: fxspinlock.hpp:90
#define NULL
Definition: types.h:112
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
Definition: fxspinlock.hpp:36

Member Function Documentation

◆ __drv_raisesIRQL()

FxSpinLock::__drv_raisesIRQL ( DISPATCH_LEVEL  )

◆ __drv_requiresIRQL()

FxSpinLock::__drv_requiresIRQL ( DISPATCH_LEVEL  )

◆ GetHistory()

PFX_SPIN_LOCK_HISTORY FxSpinLock::GetHistory ( VOID  )

Definition at line 90 of file fxspinlock.hpp.

93  {
96  return NULL;
97  }
98  else {
100  this,
103  }
104  }
USHORT GetObjectSize(VOID)
Definition: fxobject.hpp:750
#define COMPUTE_RAW_OBJECT_SIZE(_rawObjectSize)
Definition: fxhandle.h:100
FORCEINLINE size_t WDF_ALIGN_SIZE_UP(_In_ size_t Length, _In_ size_t AlignTo)
Definition: wdfcore.h:129
#define NULL
Definition: types.h:112
Definition: ntbasedef.h:90
#define WDF_PTR_ADD_OFFSET_TYPE(_ptr, _offset, _type)
Definition: wdfcore.h:141

Referenced by __drv_raisesIRQL(), __drv_requiresIRQL(), and FxSpinLock().

◆ GetLock()

MdLock* FxSpinLock::GetLock ( VOID  )

Definition at line 65 of file fxspinlock.hpp.

68  {
69  return &m_SpinLock.Get();
70  }
MdLock & Get()
Definition: mxlock.h:43
MxLock m_SpinLock
Definition: fxspinlock.hpp:107

◆ IsInterruptLock()

BOOLEAN FxSpinLock::IsInterruptLock ( VOID  )

Definition at line 81 of file fxspinlock.hpp.

84  {
85  return m_InterruptLock;
86  }
BOOLEAN m_InterruptLock
Definition: fxspinlock.hpp:118

Referenced by _Requires_lock_held_(), and _Requires_lock_not_held_().

◆ SetInterruptSpinLock()

VOID FxSpinLock::SetInterruptSpinLock ( VOID  )

Definition at line 73 of file fxspinlock.hpp.

76  {
78  }
#define TRUE
Definition: types.h:120
BOOLEAN m_InterruptLock
Definition: fxspinlock.hpp:118

Member Data Documentation

◆ m_InterruptLock

BOOLEAN FxSpinLock::m_InterruptLock

Definition at line 118 of file fxspinlock.hpp.

Referenced by FxSpinLock(), IsInterruptLock(), and SetInterruptSpinLock().

◆ m_Irql

KIRQL FxSpinLock::m_Irql

Definition at line 109 of file fxspinlock.hpp.

Referenced by __drv_raisesIRQL(), __drv_requiresIRQL(), and FxSpinLock().

◆ m_SpinLock

MxLock FxSpinLock::m_SpinLock

Definition at line 107 of file fxspinlock.hpp.

Referenced by __drv_raisesIRQL(), __drv_requiresIRQL(), and GetLock().

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