ReactOS  0.4.15-dev-3287-gfec35dc
fxtransactionedlist.hpp
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation
4 
5 Module Name:
6 
7  FxTransactionedList.hpp
8 
9 Abstract:
10 
11  This module defines the abstract FxTransactionedList class.
12 
13 Author:
14 
15 
16 
17 Environment:
18 
19  Both kernel and user mode
20 
21 Revision History:
22 
23 --*/
24 
25 #ifndef _FXTRANSACTIONEDLIST_H_
26 #define _FXTRANSACTIONEDLIST_H_
27 
32 };
33 
36 
39  )
40  {
45  }
46 
47  VOID
50  )
51  {
53  }
54 
55  FxObject*
57  VOID
58  )
59  {
60  return m_TransactionedObject;
61  }
62 
63  static
67  )
68  {
70  }
71 
74  VOID
75  )
76  {
77  return m_Transaction;
78  }
79 
80 private:
82 
84 
86 
88 };
89 
90 class FxTransactionedList : public FxStump {
91 public:
93 
95 
96  VOID
98  __in PFX_DRIVER_GLOBALS FxDriverGlobals
99  );
100 
101  VOID
103  __in PFX_DRIVER_GLOBALS FxDriverGlobals
104  );
105 
106  NTSTATUS
107  Add(
108  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
110  );
111 
112  VOID
113  Remove(
114  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
116  );
117 
120  GetNextEntry(
122  );
123 
124  BOOLEAN
125  Deleting(
126  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
127  __in_opt MxEvent* DeleteDoneEvent
128  );
129 
130 protected:
131  virtual
132  VOID
133  AcquireLock(
134  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
136  ) =0;
137 
138  virtual
139  VOID
140  ReleaseLock(
141  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
142  __in KIRQL Irql
143  ) =0;
144 
145  virtual
147  NTSTATUS
150  )
151  {
153 
154  return STATUS_SUCCESS;
155  }
156 
157  virtual
158  VOID
161  )
162  {
164  }
165 
166  virtual
167  VOID
170  )
171  {
173  }
174 
175  virtual
176  BOOLEAN
179  __in PVOID Data
180  )
181  {
184 
185  return TRUE;
186  }
187 
188  VOID
190  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
191  __in PVOID EntryData
192  );
193 
198  );
199 
200  BOOLEAN
201  RemoveLocked(
203  );
204 
205  VOID
207  __in PLIST_ENTRY ReleaseHead
208  );
209 
210  VOID
212  __in PLIST_ENTRY ReleaseHead
213  );
214 
215 protected:
217 
219 
221 
223 
225 
227 
228  //
229  // The base class does not use this field, but to save space in the size of
230  // the derived structures, we place it here after the BOOLEANs and there is
231  // minimal structure byte packing.
232  //
234 };
235 
236 
238 
239 public:
241 
242 protected:
243 
246  virtual
247  VOID
248  AcquireLock(
249  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
251  );
252 
254  virtual
255  VOID
256  ReleaseLock(
257  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
259  );
260 
262 };
263 
265 
266 public:
267 
269  __in PFX_DRIVER_GLOBALS FxDriverGlobals
270  )
271  {
272  UNREFERENCED_PARAMETER(FxDriverGlobals);
273  }
274 
275  __inline
276  NTSTATUS
277 #ifdef _MSC_VER
278 #pragma prefast(suppress:__WARNING_UNMATCHED_DEFN, "_Must_inspect_result_ not needed in kernel mode as the function always succeeds");
279 #endif
281  VOID
282  )
283  {
285  }
286 
287 protected:
288  virtual
289  _Acquires_lock_(_Global_critical_region_)
290  VOID
291  AcquireLock(
292  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
294  );
295 
296  virtual
297  _Releases_lock_(_Global_critical_region_)
298  VOID
299  ReleaseLock(
300  __in PFX_DRIVER_GLOBALS FxDriverGlobals,
301  __in KIRQL Irql
302  );
303 
305 };
306 
307 #endif // _FXTRANSACTIONEDLIST_H_
VOID Remove(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
FxWaitLockInternal m_StateChangeListLock
#define __in_opt
Definition: dbghelp.h:38
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
BOOLEAN Deleting(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt MxEvent *DeleteDoneEvent)
#define __drv_restoresIRQL
Definition: driverspecs.h:321
CHECK_RETURN_IF_USER_MODE NTSTATUS Initialize()
Definition: fxwaitlock.hpp:235
LONG NTSTATUS
Definition: precomp.h:26
VOID SearchForAndRemove(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in PVOID EntryData)
#define __drv_maxIRQL(irql)
Definition: driverspecs.h:290
NTSTATUS Add(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
VOID SetTransactionedObject(__in FxObject *Object)
_Out_ PKIRQL Irql
Definition: csq.h:179
_Must_inspect_result_ FxTransactionedEntry * GetNextEntryLocked(__in_opt FxTransactionedEntry *Entry)
VOID UnlockFromEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
UCHAR KIRQL
Definition: env_spec_w32.h:591
virtual VOID EntryRemoved(__in FxTransactionedEntry *Entry)
virtual _Must_inspect_result_ NTSTATUS ProcessAdd(__in FxTransactionedEntry *Entry)
#define __out
Definition: dbghelp.h:62
virtual VOID EntryAdded(__in FxTransactionedEntry *Entry)
unsigned char BOOLEAN
virtual _Releases_lock_(_Global_critical_region_) VOID ReleaseLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals
FxListTransactionAction
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
VOID LockForEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
virtual VOID AcquireLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __out PKIRQL Irql)=0
_Must_inspect_result_ FxTransactionedEntry * GetNextEntry(__in_opt FxTransactionedEntry *Entry)
FxListTransactionAction GetTransactionAction(VOID)
__drv_requiresIRQL(DISPATCH_LEVEL) virtual VOID ReleaseLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals
FxObject * GetTransactionedObject(VOID)
unsigned char UCHAR
Definition: xmlstorage.h:181
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
Definition: typedefs.h:119
VOID ProcessTransactionList(__in PLIST_ENTRY ReleaseHead)
#define _Must_inspect_result_
Definition: ms_sal.h:558
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
Definition: mxlock.h:101
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
FxWaitLockTransactionedList(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
__inline NTSTATUS Initialize(VOID)
#define NULL
Definition: types.h:112
VOID ProcessObjectsToRelease(__in PLIST_ENTRY ReleaseHead)
__drv_raisesIRQL(DISPATCH_LEVEL) __drv_maxIRQL(DISPATCH_LEVEL) virtual VOID AcquireLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals
virtual VOID ReleaseLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in KIRQL Irql)=0
static FxTransactionedEntry * _FromEntry(__in PLIST_ENTRY Entry)
unsigned int ULONG
Definition: retypes.h:1
virtual _Acquires_lock_(_Global_critical_region_) VOID AcquireLock(__in PFX_DRIVER_GLOBALS FxDriverGlobals
virtual BOOLEAN Compare(__in FxTransactionedEntry *Entry, __in PVOID Data)
FxTransactionedEntry(__in_opt FxObject *Object=NULL)
#define STATUS_SUCCESS
Definition: shellext.h:65
BOOLEAN RemoveLocked(__in FxTransactionedEntry *Entry)
FxListTransactionAction m_Transaction
#define __in
Definition: dbghelp.h:35
base of all file and directory entries
Definition: entries.h:82