ReactOS  0.4.15-dev-2153-g62b4c61
mxpagedlockkm.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 ModuleName:
6 
7  MxPagedLockKm.h
8 
9 Abstract:
10 
11  Kernel mode implementation of paged lock defined in
12  MxPagedLock.h
13 
14 Author:
15 
16 
17 
18 Revision History:
19 
20 
21 
22 --*/
23 
24 #pragma once
25 
26 #include "dbgmacros.h"
27 
29 
30 #include "mxpagedlock.h"
31 
32 __inline
34  )
35 {
37 
38  //
39  // Temporarily call initialize from c'tor
40  // so that we don't have to churn all of the KMDF code
41  //
42 #ifndef MERGE_COMPLETE
44 #endif
45 }
46 
47 __inline
49 #ifdef _MSC_VER
50 #pragma prefast(suppress:__WARNING_UNMATCHED_DEFN, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
51 #endif
53  )
54 {
56 
58 
59  return STATUS_SUCCESS;
60 }
61 
64 __drv_savesIRQLGlobal(FastMutexObject, this->m_Lock)
65 _Acquires_lock_(this->m_Lock)
66 __inline
67 VOID
68 MxPagedLockNoDynam::Acquire(
69  )
70 {
72 
73  ExAcquireFastMutex(&m_Lock);
74 }
75 
76 __inline
77 VOID
79  )
80 {
82 
84 }
85 
88 __drv_savesIRQLGlobal(FastMutexObject, this->m_Lock)
89 __drv_valueIs(==1;==0)
91 _When_(return==1, _Acquires_lock_(this->m_Lock))
92 __inline
93 BOOLEAN
94 MxPagedLockNoDynam::TryToAcquire(
95  )
96 {
98 
100 }
101 
103 __drv_restoresIRQLGlobal(FastMutexObject, this->m_Lock)
104 _Releases_lock_(this->m_Lock)
105 __inline
106 VOID
108  )
109 {
111 
112  ExReleaseFastMutex(&m_Lock);
113 }
114 
115 __inline
116 VOID
118  )
119 {
121 
123 }
124 
125 
126 __inline
127 VOID
129  )
130 {
132 }
133 
134 __inline
136  )
137 {
139 }
MdPagedLock m_Lock
Definition: mxpagedlock.h:40
this m_Lock _Acquires_lock_(this->m_Lock) __inline VOID MxPagedLockNoDynam
Definition: mxpagedlockkm.h:65
#define _Must_inspect_result_
Definition: no_sal2.h:62
__inline VOID ReleaseUnsafe()
LONG NTSTATUS
Definition: precomp.h:26
__inline VOID AcquireUnsafe()
Definition: mxpagedlockkm.h:78
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
__drv_requiresIRQL(APC_LEVEL) __drv_restoresIRQLGlobal(FastMutexObject
__inline ~MxPagedLock()
unsigned char BOOLEAN
FAST_MUTEX
Definition: extypes.h:17
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
#define SET_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:59
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:39
#define __drv_when(cond, annotes)
Definition: driverspecs.h:317
#define CLEAR_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:60
_Must_inspect_result_ this m_Lock __drv_setsIRQL(APC_LEVEL)) _When_(return
_Must_inspect_result_ __inline NTSTATUS Initialize()
Definition: mxpagedlockkm.h:52
#define VOID
Definition: acefi.h:82
__inline MxPagedLock()
Definition: mxpagedlockkm.h:33
this m_Lock _Releases_lock_(this->m_Lock) __inline VOID MxPagedLockNoDynam
_In_ BOOLEAN Release
Definition: cdrom.h:920
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
#define _When_(c, a)
Definition: no_sal2.h:38
#define ASSERT_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:58
__inline VOID Uninitialize()
#define __drv_savesIRQLGlobal(kind, param)
Definition: driverspecs.h:309
FAST_MUTEX MdPagedLock
Definition: mxpagedlockkm.h:28
#define STATUS_SUCCESS
Definition: shellext.h:65
_Must_inspect_result_ this m_Lock __drv_valueIs(==1;==0) __drv_when(return
#define APC_LEVEL
Definition: env_spec_w32.h:695
__drv_maxIRQL(APC_LEVEL) __drv_setsIRQL(APC_LEVEL) __drv_savesIRQLGlobal(FastMutexObject
#define __drv_restoresIRQLGlobal(kind, param)
Definition: driverspecs.h:305