ReactOS 0.4.16-dev-257-g6aa11ac
MxLockNoDynam Class Reference

#include <mxlock.h>

Inheritance diagram for MxLockNoDynam:

Public Member Functions

MdLockGet ()
 
__inline VOID Initialize ()
 
 _Acquires_lock_ (this->m_Lock) __drv_maxIRQL(DISPATCH_LEVEL) __drv_setsIRQL(DISPATCH_LEVEL) __inline VOID Acquire(__out __drv_deref(__drv_savesIRQL) KIRQL *OldIrql)
 
CHECK_RETURN_IF_USER_MODE __inline BOOLEAN TryToAcquire (VOID)
 
 _Acquires_lock_ (this->m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID AcquireAtDpcLevel()
 
 _Releases_lock_ (this->m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID Release(__drv_restoresIRQL KIRQL NewIrql)
 
 _Releases_lock_ (this->m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID ReleaseFromDpcLevel()
 
__inline VOID Uninitialize ()
 

Protected Attributes

MdLock m_Lock
 

Private Attributes

 DECLARE_DBGFLAG_INITIALIZED
 

Detailed Description

Definition at line 34 of file mxlock.h.

Member Function Documentation

◆ _Acquires_lock_() [1/2]

MxLockNoDynam::_Acquires_lock_ ( this->  m_Lock)

◆ _Acquires_lock_() [2/2]

MxLockNoDynam::_Acquires_lock_ ( this->  m_Lock)

◆ _Releases_lock_() [1/2]

MxLockNoDynam::_Releases_lock_ ( this->  m_Lock)

◆ _Releases_lock_() [2/2]

MxLockNoDynam::_Releases_lock_ ( this->  m_Lock)

◆ Get()

MdLock & MxLockNoDynam::Get ( )
inline

Definition at line 43 of file mxlock.h.

45 {
46 return m_Lock;
47 }
MdLock m_Lock
Definition: mxlock.h:40

Referenced by FxSpinLock::GetLock(), FxInterrupt::InitializeWorker(), and FxInterrupt::IsSharedSpinLock().

◆ Initialize()

__inline VOID MxLockNoDynam::Initialize ( )

Definition at line 43 of file mxlockkm.h.

45{
47
49}
#define SET_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:59
#define KeInitializeSpinLock(sl)
Definition: env_spec_w32.h:604

Referenced by FxDriverGlobalsInitializeDebugExtension(), FxLibraryGlobalsCommission(), FxLock::FxLock(), and MxLock::MxLock().

◆ TryToAcquire()

__inline BOOLEAN MxLockNoDynam::TryToAcquire ( VOID  )

Definition at line 95 of file mxlockum.h.

98{
99 BOOLEAN acquired;
100
102
104
105 if (acquired) {
106 DWORD threadId = GetCurrentThreadId();
107
108 if (threadId == m_Lock.OwnerThreadId) {
109 Mx::MxAssertMsg("Recursive acquision of the lock is not allowed", FALSE);
110 }
111
112 m_Lock.OwnerThreadId = threadId;
113 }
114
115 return acquired;
116}
unsigned char BOOLEAN
static __inline VOID MxAssertMsg(__in LPSTR Message, __in BOOLEAN Condition)
Definition: mxgeneralkm.h:176
#define ASSERT_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:58
#define FALSE
Definition: types.h:117
unsigned long DWORD
Definition: ntddk_ex.h:95
#define BOOLEAN
Definition: pedump.c:73
DWORD OwnerThreadId
Definition: mxlockum.h:29
CRITICAL_SECTION Lock
Definition: mxlockum.h:27
BOOL WINAPI TryEnterCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459

◆ Uninitialize()

__inline VOID MxLockNoDynam::Uninitialize ( )

Definition at line 104 of file mxlockkm.h.

106{
108}
#define CLEAR_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:60

Referenced by FxIoQueue::Dispose(), FxFreeDriverGlobals(), and FxLibraryGlobalsDecommission().

Member Data Documentation

◆ DECLARE_DBGFLAG_INITIALIZED

MxLockNoDynam::DECLARE_DBGFLAG_INITIALIZED
private

Definition at line 37 of file mxlock.h.

◆ m_Lock

MdLock MxLockNoDynam::m_Lock
protected

Definition at line 40 of file mxlock.h.

Referenced by _Acquires_lock_(), _Releases_lock_(), Get(), Initialize(), and TryToAcquire().


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