ReactOS  0.4.15-dev-2352-g3fa57b8
wdfsync.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) Microsoft Corporation. All rights reserved.
4 
5 _WdfVersionBuild_
6 
7 Module Name:
8 
9  wdfsync.h
10 
11 Abstract:
12 
13  This module contains contains the Windows Driver Framework synchronization
14  DDIs.
15 
16 Environment:
17 
18  kernel mode only
19 
20 Revision History:
21 
22 
23 --*/
24 
25 //
26 // NOTE: This header is generated by stubwork. Please make any
27 // modifications to the corresponding template files
28 // (.x or .y) and use stubwork to regenerate the header
29 //
30 
31 #ifndef _WDFSYNC_H_
32 #define _WDFSYNC_H_
33 
34 #ifndef WDF_EXTERN_C
35  #ifdef __cplusplus
36  #define WDF_EXTERN_C extern "C"
37  #define WDF_EXTERN_C_START extern "C" {
38  #define WDF_EXTERN_C_END }
39  #else
40  #define WDF_EXTERN_C
41  #define WDF_EXTERN_C_START
42  #define WDF_EXTERN_C_END
43  #endif
44 #endif
45 
47 
48 
49 
50 #if (NTDDI_VERSION >= NTDDI_WIN2K)
51 
52 
53 
54 //
55 // WDF Function: WdfObjectAcquireLock
56 //
57 typedef
59 WDFAPI
60 VOID
61 (STDCALL *PFN_WDFOBJECTACQUIRELOCK)(
62  _In_
64  _In_
66  _Acquires_lock_(_Curr_)
68  );
69 
72 VOID
73 WdfObjectAcquireLock(
74  _In_
76  _Acquires_lock_(_Curr_)
78  )
79 {
81 }
82 
83 //
84 // WDF Function: WdfObjectReleaseLock
85 //
86 typedef
88 WDFAPI
89 VOID
90 (STDCALL *PFN_WDFOBJECTRELEASELOCK)(
91  _In_
93  _In_
95  _Releases_lock_(_Curr_)
97  );
98 
101 VOID
102 WdfObjectReleaseLock(
103  _In_
104  _Requires_lock_held_(_Curr_)
105  _Releases_lock_(_Curr_)
107  )
108 {
109  ((PFN_WDFOBJECTRELEASELOCK) WdfFunctions[WdfObjectReleaseLockTableIndex])(WdfDriverGlobals, Object);
110 }
111 
112 //
113 // WDF Function: WdfWaitLockCreate
114 //
115 typedef
118 WDFAPI
119 NTSTATUS
120 (STDCALL *PFN_WDFWAITLOCKCREATE)(
121  _In_
123  _In_opt_
125  _Out_
126  WDFWAITLOCK* Lock
127  );
128 
132 NTSTATUS
133 WdfWaitLockCreate(
134  _In_opt_
136  _Out_
137  WDFWAITLOCK* Lock
138  )
139 {
140  return ((PFN_WDFWAITLOCKCREATE) WdfFunctions[WdfWaitLockCreateTableIndex])(WdfDriverGlobals, LockAttributes, Lock);
141 }
142 
143 //
144 // WDF Function: WdfWaitLockAcquire
145 //
146 typedef
153 WDFAPI
154 NTSTATUS
156  _In_
158  _In_
160  WDFWAITLOCK Lock,
161  _In_opt_
163  );
164 
172 NTSTATUS
174  _In_
176  WDFWAITLOCK Lock,
177  _In_opt_
179  )
180 {
182 }
183 
184 //
185 // WDF Function: WdfWaitLockRelease
186 //
187 typedef
189 WDFAPI
190 VOID
191 (STDCALL *PFN_WDFWAITLOCKRELEASE)(
192  _In_
194  _In_
195  _Requires_lock_held_(_Curr_)
196  _Releases_lock_(_Curr_)
197  WDFWAITLOCK Lock
198  );
199 
202 VOID
203 WdfWaitLockRelease(
204  _In_
205  _Requires_lock_held_(_Curr_)
206  _Releases_lock_(_Curr_)
207  WDFWAITLOCK Lock
208  )
209 {
210  ((PFN_WDFWAITLOCKRELEASE) WdfFunctions[WdfWaitLockReleaseTableIndex])(WdfDriverGlobals, Lock);
211 }
212 
213 //
214 // WDF Function: WdfSpinLockCreate
215 //
216 typedef
219 WDFAPI
220 NTSTATUS
221 (STDCALL *PFN_WDFSPINLOCKCREATE)(
222  _In_
224  _In_opt_
226  _Out_
227  WDFSPINLOCK* SpinLock
228  );
229 
233 NTSTATUS
234 WdfSpinLockCreate(
235  _In_opt_
237  _Out_
238  WDFSPINLOCK* SpinLock
239  )
240 {
242 }
243 
244 //
245 // WDF Function: WdfSpinLockAcquire
246 //
247 typedef
250 WDFAPI
251 VOID
252 (STDCALL *PFN_WDFSPINLOCKACQUIRE)(
253  _In_
255  _In_
257  _Acquires_lock_(_Curr_)
259  WDFSPINLOCK SpinLock
260  );
261 
265 VOID
266 WdfSpinLockAcquire(
267  _In_
269  _Acquires_lock_(_Curr_)
271  WDFSPINLOCK SpinLock
272  )
273 {
275 }
276 
277 //
278 // WDF Function: WdfSpinLockRelease
279 //
280 typedef
283 WDFAPI
284 VOID
285 (STDCALL *PFN_WDFSPINLOCKRELEASE)(
286  _In_
288  _In_
289  _Requires_lock_held_(_Curr_)
290  _Releases_lock_(_Curr_)
292  WDFSPINLOCK SpinLock
293  );
294 
298 VOID
299 WdfSpinLockRelease(
300  _In_
301  _Requires_lock_held_(_Curr_)
302  _Releases_lock_(_Curr_)
304  WDFSPINLOCK SpinLock
305  )
306 {
308 }
309 
310 
311 
312 #endif // (NTDDI_VERSION >= NTDDI_WIN2K)
313 
314 
316 
317 #endif // _WDFSYNC_H_
318 
#define _Must_inspect_result_
Definition: no_sal2.h:62
_Must_inspect_result_ _IRQL_requires_max_(DISPATCH_LEVEL) WDFAPI NTSTATUS(STDCALL *PFN_WDFWAITLOCKCREATE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals
Definition: wdfsync.h:117
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES SpinLockAttributes
Definition: wdfsync.h:225
#define _Always_(a)
Definition: no_sal2.h:90
LONG NTSTATUS
Definition: precomp.h:26
DriverGlobals
#define _IRQL_raises_(irql)
Definition: driverspecs.h:211
#define _In_opt_
Definition: no_sal2.h:212
#define WdfFunctions
Definition: wdf.h:66
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:382
typedef _Acquires_lock_(Lock))) _When_(Timeout !
#define WDFAPI
Definition: wdftypes.h:53
#define _IRQL_requires_min_(irql)
Definition: driverspecs.h:214
#define _Releases_lock_(a)
Definition: btrfs_drv.h:208
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFSPINLOCK * SpinLock
Definition: wdfsync.h:225
_In_ _Requires_lock_not_held_(_Curr_) _Acquires_lock_(_Curr_) _IRQL_saves_ WDFSPINLOCK SpinLock)
Definition: wdfsync.h:256
#define _Out_
Definition: no_sal2.h:160
#define WDF_EXTERN_C_START
Definition: wdfsync.h:41
PWDF_DRIVER_GLOBALS WdfDriverGlobals
_Must_inspect_result_ WDFAPI NTSTATUS(STDCALL * PFN_WDFWAITLOCKACQUIRE)(_In_ PWDF_DRIVER_GLOBALS DriverGlobals, _In_ _Requires_lock_not_held_(_Curr_) WDFWAITLOCK Lock, _In_opt_ PLONGLONG Timeout)
Definition: wdfsync.h:155
#define STDCALL
Definition: wdf.h:45
#define NTSTATUS
Definition: precomp.h:20
#define VOID
Definition: acefi.h:82
#define WDF_EXTERN_C_END
Definition: wdfsync.h:42
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
#define _In_
Definition: no_sal2.h:158
static ULONG Timeout
Definition: ping.c:61
#define FORCEINLINE
Definition: wdftypes.h:67
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES LockAttributes
Definition: wdfsync.h:124
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
_In_ _Requires_lock_held_(_Curr_) _Releases_lock_(_Curr_) WDFOBJECT Object)
Definition: wdfsync.h:94
#define STATUS_SUCCESS
Definition: shellext.h:65
typedef _When_(Timeout==NULL, _IRQL_requires_max_(PASSIVE_LEVEL)) _When_(Timeout !
#define _IRQL_restores_
Definition: driverspecs.h:216
#define _IRQL_saves_
Definition: driverspecs.h:218
_Must_inspect_result_ FORCEINLINE NTSTATUS WdfWaitLockAcquire(_In_ _Requires_lock_not_held_(_Curr_) WDFWAITLOCK Lock, _In_opt_ PLONGLONG Timeout)
Definition: wdfsync.h:173