ReactOS  0.4.15-dev-3177-gd6a0299
mxpagedlock.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 ModuleName:
6 
7  MxPagedLock.h
8 
9 Abstract:
10 
11  Mode agnostic definition of paged lock
12 
13  See MxPagedLockKm.h and MxPagedLockUm.h for mode
14  specific implementations
15 
16 Author:
17 
18 
19 
20 Revision History:
21 
22 
23 
24 --*/
25 
26 #pragma once
27 
28 //
29 // MxPagedLockNoDynam has no c'tor/d'tor
30 // so as to be usable in global structs in km
31 //
32 // MxPagedLock dervies from it and adds c'tor/d'tor
33 //
35 {
36 
38 
39 protected:
41 public:
43  __inline
44  NTSTATUS
45  Initialize(
46  );
47 
50  __drv_savesIRQLGlobal(FastMutexObject, this->m_Lock)
51  _Acquires_lock_(this->m_Lock)
52  __inline
53  VOID
54  Acquire(
55  );
56 
57 
58  __inline
59  VOID
61  );
62 
65  __drv_savesIRQLGlobal(FastMutexObject, this->m_Lock)
66  __drv_valueIs(==1;==0)
68  _When_(return==1, _Acquires_lock_(this->m_Lock))
69  __inline
70  BOOLEAN
71  TryToAcquire(
72  );
73 
75  __drv_restoresIRQLGlobal(FastMutexObject,this->m_Lock)
76  _Releases_lock_(this->m_Lock)
77  __inline
78  VOID
79  Release(
80  );
81 
82 
83  __inline
84  VOID
86  );
87 
88  __inline
89  VOID
91  );
92 };
93 
95 {
96 public:
97  __inline
98  MxPagedLock();
99 
100  __inline
101  ~MxPagedLock();
102 };
103 
MdPagedLock m_Lock
Definition: mxpagedlock.h:40
__drv_maxIRQL(APC_LEVEL) __drv_setsIRQL(APC_LEVEL) __drv_savesIRQLGlobal(FastMutexObject
__inline VOID ReleaseUnsafe()
LONG NTSTATUS
Definition: precomp.h:26
__inline VOID AcquireUnsafe()
Definition: mxpagedlockkm.h:78
this m_Lock _Acquires_lock_(this->m_Lock) __inline VOID Acquire()
#define _When_(expr, annos)
Definition: ms_sal.h:254
__inline ~MxPagedLock()
this m_Lock _Releases_lock_(this->m_Lock) __inline VOID Release()
unsigned char BOOLEAN
_Must_inspect_result_ this m_Lock __drv_setsIRQL(APC_LEVEL)) _When_(return
_Must_inspect_result_ this m_Lock __drv_valueIs(==1;==0) __drv_when(return
#define __drv_when(cond, annotes)
Definition: driverspecs.h:334
_Must_inspect_result_ __inline NTSTATUS Initialize()
Definition: mxpagedlockkm.h:52
#define _Must_inspect_result_
Definition: ms_sal.h:558
__inline MxPagedLock()
Definition: mxpagedlockkm.h:33
__drv_requiresIRQL(APC_LEVEL) __drv_restoresIRQLGlobal(FastMutexObject
_In_ BOOLEAN Release
Definition: cdrom.h:920
__inline VOID Uninitialize()
#define __drv_savesIRQLGlobal(kind, param)
Definition: driverspecs.h:326
#define APC_LEVEL
Definition: env_spec_w32.h:695
#define __drv_restoresIRQLGlobal(kind, param)
Definition: driverspecs.h:322