ReactOS 0.4.15-dev-8096-ga0eec98
mxpagedlockkm.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation
4
5ModuleName:
6
7 MxPagedLockKm.h
8
9Abstract:
10
11 Kernel mode implementation of paged lock defined in
12 MxPagedLock.h
13
14Author:
15
16
17
18Revision 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
67VOID
68MxPagedLockNoDynam::Acquire(
69 )
70{
72
73 ExAcquireFastMutex(&m_Lock);
74}
75
76__inline
77VOID
79 )
80{
82
84}
85
88__drv_savesIRQLGlobal(FastMutexObject, this->m_Lock)
91_When_(return==1, _Acquires_lock_(this->m_Lock))
92__inline
94MxPagedLockNoDynam::TryToAcquire(
95 )
96{
98
99 return ExTryToAcquireFastMutex(&m_Lock);
100}
101
103__drv_restoresIRQLGlobal(FastMutexObject, this->m_Lock)
104_Releases_lock_(this->m_Lock)
105__inline
106VOID
108 )
109{
111
112 ExReleaseFastMutex(&m_Lock);
113}
114
115__inline
116VOID
118 )
119{
121
123}
124
125
126__inline
127VOID
129 )
130{
132}
133
134__inline
136 )
137{
139}
unsigned char BOOLEAN
#define VOID
Definition: acefi.h:82
LONG NTSTATUS
Definition: precomp.h:26
return
Definition: dirsup.c:529
_In_ BOOLEAN Release
Definition: cdrom.h:920
MdPagedLock m_Lock
Definition: mxpagedlock.h:40
__inline VOID Uninitialize()
__inline VOID AcquireUnsafe()
Definition: mxpagedlockkm.h:78
_Must_inspect_result_ __inline NTSTATUS Initialize()
Definition: mxpagedlockkm.h:52
__inline VOID ReleaseUnsafe()
__inline ~MxPagedLock()
__inline MxPagedLock()
Definition: mxpagedlockkm.h:33
#define _Acquires_lock_(lock)
#define _Releases_lock_(lock)
#define ASSERT_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:58
#define SET_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:59
#define CLEAR_DBGFLAG_INITIALIZED
Definition: dbgmacros.h:60
#define __drv_when(cond, annotes)
Definition: driverspecs.h:335
#define __drv_restoresIRQLGlobal(kind, param)
Definition: driverspecs.h:323
#define __drv_setsIRQL(irql)
Definition: driverspecs.h:328
#define __drv_requiresIRQL(irql)
Definition: driverspecs.h:321
#define __drv_savesIRQLGlobal(kind, param)
Definition: driverspecs.h:327
#define __drv_maxIRQL(irql)
Definition: driverspecs.h:291
#define APC_LEVEL
Definition: env_spec_w32.h:695
VOID FASTCALL ExAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:23
VOID FASTCALL ExReleaseFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:31
BOOLEAN FASTCALL ExTryToAcquireFastMutex(IN PFAST_MUTEX FastMutex)
Definition: fmutex.c:39
#define _Must_inspect_result_
Definition: ms_sal.h:558
#define _When_(expr, annos)
Definition: ms_sal.h:254
FAST_MUTEX MdPagedLock
Definition: mxpagedlockkm.h:28
_Must_inspect_result_ this m_Lock __drv_valueIs(==1;==0) __drv_when(return
VOID FASTCALL ExReleaseFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:86
VOID FASTCALL ExAcquireFastMutexUnsafe(IN OUT PFAST_MUTEX FastMutex)
Definition: fmutex.c:75
#define STATUS_SUCCESS
Definition: shellext.h:65
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
FAST_MUTEX
Definition: extypes.h:17