5#define BitScanForward _BitScanForward
6#define BitScanReverse _BitScanReverse
7#define BitTest _bittest
8#define BitTestAndComplement _bittestandcomplement
9#define BitTestAndSet _bittestandset
10#define BitTestAndReset _bittestandreset
12#define BitScanForward64 _BitScanForward64
13#define BitScanReverse64 _BitScanReverse64
14#define BitTest64 _bittest64
15#define BitTestAndComplement64 _bittestandcomplement64
16#define BitTestAndSet64 _bittestandset64
17#define BitTestAndReset64 _bittestandreset64
20#if defined(_M_ARM) || defined(_M_IA64)
21#define __ACQ_(x) x##_acq
22#define __REL_(x) x##_rel
23#define __NF_(x) x##_nf
30#define InterlockedBitTestAndSet _interlockedbittestandset
31#define InterlockedBitTestAndSetAcquire __ACQ_(_interlockedbittestandset)
32#define InterlockedBitTestAndSetRelease __REL_(_interlockedbittestandset)
33#define InterlockedBitTestAndSetNoFence __NF_(_interlockedbittestandset)
35#define InterlockedBitTestAndReset _interlockedbittestandreset
36#define InterlockedBitTestAndResetAcquire __ACQ_(_interlockedbittestandreset)
37#define InterlockedBitTestAndResetRelease __REL_(_interlockedbittestandreset)
38#define InterlockedBitTestAndResetNoFence __NF_(_interlockedbittestandreset)
41#define InterlockedBitTestAndSet64 _interlockedbittestandset64
42#define InterlockedBitTestAndSet64Acquire __ACQ_(_interlockedbittestandset64)
43#define InterlockedBitTestAndSet64Release __REL_(_interlockedbittestandset64)
44#define InterlockedBitTestAndSet64NoFence __NF_(_interlockedbittestandset64)
46#define InterlockedBitTestAndReset64 _interlockedbittestandreset64
47#define InterlockedBitTestAndReset64Acquire __ACQ_(_interlockedbittestandreset64)
48#define InterlockedBitTestAndReset64Release __REL_(_interlockedbittestandreset64)
49#define InterlockedBitTestAndReset64NoFence __NF_(_interlockedbittestandreset64)
52#if defined(_M_AMD64) || defined(_M_IX86)
61#define InterlockedAdd _InlineInterlockedAdd
62#define InterlockedAddAcquire _InlineInterlockedAdd
63#define InterlockedAddRelease _InlineInterlockedAdd
64#define InterlockedAddNoFence _InlineInterlockedAdd
66#define InterlockedAdd _InterlockedAdd
67#define InterlockedAddAcquire __ACQ_(_InterlockedAdd)
68#define InterlockedAddRelease __REL_(_InterlockedAdd)
69#define InterlockedAddNoFence __NF_(_InterlockedAdd)
72#define InterlockedAdd64 _InterlockedAdd64
73#define InterlockedAddAcquire64 __ACQ_(_InterlockedAdd64)
74#define InterlockedAddRelease64 __REL_(_InterlockedAdd64)
75#define InterlockedAddNoFence64 __NF_(_InterlockedAdd64)
77#define InterlockedAnd _InterlockedAnd
78#define InterlockedAndAcquire __ACQ_(_InterlockedAnd)
79#define InterlockedAndRelease __REL_(_InterlockedAnd)
80#define InterlockedAndNoFence __NF_(_InterlockedAnd)
82#define InterlockedAnd8 _InterlockedAnd8
84#define InterlockedAndAcquire8 _InterlockedAnd8_acq
85#define InterlockedAndRelease8 _InterlockedAnd8_rel
86#define InterlockedAndNoFence8 _InterlockedAnd8_nf
88#define InterlockedAnd8Acquire _InterlockedAnd8_acq
89#define InterlockedAnd8Release _InterlockedAnd8_rel
92#define InterlockedAnd16 _InterlockedAnd16
94#define InterlockedAndAcquire16 _InterlockedAnd16_acq
95#define InterlockedAndRelease16 _InterlockedAnd16_rel
96#define InterlockedAndNoFence16 _InterlockedAnd16_nf
98#define InterlockedAnd16Acquire _InterlockedAnd16_acq
99#define InterlockedAnd16Release _InterlockedAnd16_rel
102#define InterlockedAnd64 _InterlockedAnd64
104#define InterlockedAndAcquire64 __ACQ_(_InterlockedAnd64)
105#define InterlockedAndRelease64 __REL_(_InterlockedAnd64)
106#define InterlockedAndNoFence64 __NF_(_InterlockedAnd64)
108#define InterlockedAnd64Acquire __ACQ_(_InterlockedAnd64)
109#define InterlockedAnd64Release __REL_(_InterlockedAnd64)
110#define InterlockedAnd64NoFence __NF_(_InterlockedAnd64)
114#define InterlockedAndAffinity InterlockedAnd64
116#define InterlockedAndAffinity InterlockedAnd
119#define InterlockedCompareExchange _InterlockedCompareExchange
120#define InterlockedCompareExchangeAcquire __ACQ_(_InterlockedCompareExchange)
121#define InterlockedCompareExchangeRelease __REL_(_InterlockedCompareExchange)
122#define InterlockedCompareExchangeNoFence __NF_(_InterlockedCompareExchange)
124#define InterlockedCompareExchange16 _InterlockedCompareExchange16
125#define InterlockedCompareExchangeAcquire16 __ACQ_(_InterlockedCompareExchange16)
126#define InterlockedCompareExchangeRelease16 __REL_(_InterlockedCompareExchange16)
127#define InterlockedCompareExchangeNoFence16 __NF_(_InterlockedCompareExchange16)
129#define InterlockedCompareExchange64 _InterlockedCompareExchange64
130#define InterlockedCompareExchangeAcquire64 __ACQ_(_InterlockedCompareExchange64)
131#define InterlockedCompareExchangeRelease64 __REL_(_InterlockedCompareExchange64)
132#define InterlockedCompareExchangeNoFence64 __NF_(_InterlockedCompareExchange64)
135#define InterlockedCompareExchange128 _InterlockedCompareExchange128
139#define InterlockedCompare64Exchange128 _InterlockedCompare64Exchange128
140#define InterlockedCompare64ExchangeAcquire128 _InterlockedCompare64Exchange128_acq
141#define InterlockedCompare64ExchangeRelease128 _InterlockedCompare64Exchange128_rel
144#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
145#define InterlockedCompareExchangePointerAcquire __ACQ_(_InterlockedCompareExchangePointer)
146#define InterlockedCompareExchangePointerRelease __REL_(_InterlockedCompareExchangePointer)
147#define InterlockedCompareExchangePointerNoFence __NF_(_InterlockedCompareExchangePointer)
149#define InterlockedDecrement _InterlockedDecrement
150#define InterlockedDecrementAcquire __ACQ_(_InterlockedDecrement)
151#define InterlockedDecrementRelease __REL_(_InterlockedDecrement)
152#define InterlockedDecrementNoFence __NF_(_InterlockedDecrement)
154#define InterlockedDecrement16 _InterlockedDecrement16
155#define InterlockedDecrementAcquire16 __ACQ_(_InterlockedDecrement16)
156#define InterlockedDecrementRelease16 __REL_(_InterlockedDecrement16)
157#define InterlockedDecrementNoFence16 __NF_(_InterlockedDecrement16)
159#define InterlockedDecrement64 _InterlockedDecrement64
160#define InterlockedDecrementAcquire64 __ACQ_(_InterlockedDecrement64)
161#define InterlockedDecrementRelease64 __REL_(_InterlockedDecrement64)
162#define InterlockedDecrementNoFence64 __NF_(_InterlockedDecrement64)
165#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a)
166#define InterlockedDecrementSizeTNoFence(a) InterlockedDecrementNoFence64((LONG64 *)a)
168#define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a)
169#define InterlockedDecrementSizeTNoFence(a) InterlockedDecrementNoFence((LONG *)a)
172#define InterlockedExchange _InterlockedExchange
173#define InterlockedExchangeAcquire __ACQ_(_InterlockedExchange)
175#define InterlockedExchangeNoFence __NF_(_InterlockedExchange)
177#if (_MSC_VER >= 1600)
178#define InterlockedExchange8 _InterlockedExchange8
181#define InterlockedExchange16 _InterlockedExchange16
183#define InterlockedExchangeAcquire16 __ACQ_(_InterlockedExchange16)
184#define InterlockedExchangeNoFence16 __NF_(_InterlockedExchange16)
186#define InterlockedExchange64 _InterlockedExchange64
187#define InterlockedExchangeAcquire64 __ACQ_(_InterlockedExchange64)
189#define InterlockedExchangeNoFence64 __NF_(_InterlockedExchange64)
191#define InterlockedExchangePointer _InterlockedExchangePointer
192#define InterlockedExchangePointerAcquire __ACQ_(_InterlockedExchangePointer)
194#define InterlockedExchangePointerNoFence __NF_(_InterlockedExchangePointer)
196#define InterlockedExchangeAdd _InterlockedExchangeAdd
197#define InterlockedExchangeAddAcquire __ACQ_(_InterlockedExchangeAdd)
198#define InterlockedExchangeAddRelease __REL_(_InterlockedExchangeAdd)
199#define InterlockedExchangeAddNoFence __NF_(_InterlockedExchangeAdd)
201#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
202#define InterlockedExchangeAddAcquire64 __ACQ_(_InterlockedExchangeAdd64)
203#define InterlockedExchangeAddRelease64 __REL_(_InterlockedExchangeAdd64)
204#define InterlockedExchangeAddNoFence64 __NF_(_InterlockedExchangeAdd64)
207#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b)
208#define InterlockedExchangeAddSizeTAcquire(a, b) InterlockedExchangeAddAcquire64((LONG64 *)a, b)
209#define InterlockedExchangeAddSizeTNoFence(a, b) InterlockedExchangeAddNoFence64((LONG64 *)a, b)
211#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b)
212#define InterlockedExchangeAddSizeTAcquire(a, b) InterlockedExchangeAddAcquire((LONG *)a, b)
213#define InterlockedExchangeAddSizeTNoFence(a, b) InterlockedExchangeAddNoFence((LONG *)a, b)
216#define InterlockedIncrement _InterlockedIncrement
217#define InterlockedIncrementAcquire __ACQ_(_InterlockedIncrement)
218#define InterlockedIncrementRelease __REL_(_InterlockedIncrement)
219#define InterlockedIncrementNoFence __NF_(_InterlockedIncrement)
221#define InterlockedIncrement16 _InterlockedIncrement16
222#define InterlockedIncrementAcquire16 __ACQ_(_InterlockedIncrement16)
223#define InterlockedIncrementRelease16 __REL_(_InterlockedIncrement16)
224#define InterlockedIncrementNoFence16 __NF_(_InterlockedIncrement16)
226#define InterlockedIncrement64 _InterlockedIncrement64
227#define InterlockedIncrementAcquire64 __ACQ_(_InterlockedIncrement64)
228#define InterlockedIncrementRelease64 __REL_(_InterlockedIncrement64)
229#define InterlockedIncrementNoFence64 __NF_(_InterlockedIncrement64)
232#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a)
233#define InterlockedIncrementSizeTNoFence(a) InterlockedIncrementNoFence64((LONG64 *)a)
235#define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a)
236#define InterlockedIncrementSizeTNoFence(a) InterlockedIncrementNoFence((LONG *)a)
239#define InterlockedOr _InterlockedOr
240#define InterlockedOrAcquire __ACQ_(_InterlockedOr)
241#define InterlockedOrRelease __REL_(_InterlockedOr)
242#define InterlockedOrNoFence __NF_(_InterlockedOr)
244#define InterlockedOr8 _InterlockedOr8
246#define InterlockedOrAcquire8 _InterlockedOr8_acq
247#define InterlockedOrRelease8 _InterlockedOr8_rel
248#define InterlockedOrNoFence8 _InterlockedOr8_nf
249#elif defined(_M_IA64)
250#define InterlockedOr8Acquire _InterlockedOr8_acq
251#define InterlockedOr8Release _InterlockedOr8_rel
254#define InterlockedOr16 _InterlockedOr16
256#define InterlockedOrAcquire16 _InterlockedOr16_acq
257#define InterlockedOrRelease16 _InterlockedOr16_rel
258#define InterlockedOrNoFence16 _InterlockedOr16_nf
259#elif defined(_M_IA64)
260#define InterlockedOr16Acquire _InterlockedOr16_acq
261#define InterlockedOr16Release _InterlockedOr16_rel
264#define InterlockedOr64 _InterlockedOr64
266#define InterlockedOrAcquire64 _InterlockedOr64_acq
267#define InterlockedOrRelease64 _InterlockedOr64_rel
268#define InterlockedOrNoFence64 _InterlockedOr64_nf
269#elif defined(_M_IA64) || defined(_M_AMD64)
270#define InterlockedOr64Acquire __ACQ_(_InterlockedOr64)
271#define InterlockedOr64Release __REL_(_InterlockedOr64)
272#define InterlockedOr64NoFence __NF_(_InterlockedOr64)
276#define InterlockedOrAffinity InterlockedOr64
278#define InterlockedOrAffinity InterlockedOr
281#define InterlockedXor _InterlockedXor
282#define InterlockedXorAcquire __ACQ_(_InterlockedXor)
283#define InterlockedXorRelease __REL_(_InterlockedXor)
284#define InterlockedXorNoFence __NF_(_InterlockedXor)
286#define InterlockedXor8 _InterlockedXor8
288#define InterlockedXorAcquire8 _InterlockedXor8_acq
289#define InterlockedXorRelease8 _InterlockedXor8_rel
290#define InterlockedXorNoFence8 _InterlockedXor8_nf
291#elif defined(_M_IA64)
292#define InterlockedXor8Acquire _InterlockedXor8_acq
293#define InterlockedXor8Release _InterlockedXor8_rel
296#define InterlockedXor16 _InterlockedXor16
298#define InterlockedXorAcquire16 _InterlockedXor16_acq
299#define InterlockedXorRelease16 _InterlockedXor16_rel
300#define InterlockedXorNoFence16 _InterlockedXor16_nf
301#elif defined(_M_IA64)
302#define InterlockedXor16Acquire _InterlockedXor16_acq
303#define InterlockedXor16Release _InterlockedXor16_rel
306#define InterlockedXor64 _InterlockedXor64
308#define InterlockedXorAcquire64 _InterlockedXor64_acq
309#define InterlockedXorRelease64 _InterlockedXor64_rel
310#define InterlockedXorNoFence64 _InterlockedXor64_nf
311#elif defined(_M_IA64) || defined(_M_AMD64)
312#define InterlockedXor64Acquire __ACQ_(_InterlockedXor64)
313#define InterlockedXor64Release __REL_(_InterlockedXor64)
314#define InterlockedXor64NoFence __NF_(_InterlockedXor64)
319#undef _InterlockedExchange64
320#define _InterlockedExchange64 _InlineInterlockedExchange64
323_InlineInterlockedExchange64(
328 for (Old = *
Target; ; Old = Prev)
336#undef _InterlockedAdd64
337#define _InterlockedAdd64 _InlineInterlockedAdd64
340_InlineInterlockedAdd64(
345 for (Old = *
Target; ; Old = Prev)
354#undef _InterlockedExchangeAdd64
355#define _InterlockedExchangeAdd64 _InlineInterlockedExchangeAdd64
358_InlineInterlockedExchangeAdd64(
364 for (Old = *
Target; ; Old = Prev)
373#undef _InterlockedAnd64
374#define _InterlockedAnd64 _InlineInterlockedAnd64
377_InlineInterlockedAnd64(
382 for (Old = *
Target; ; Old = Prev)
391#undef _InterlockedOr64
392#define _InterlockedOr64 _InlineInterlockedOr64
395_InlineInterlockedOr64(
400 for (Old = *
Target; ; Old = Prev)
409#undef _InterlockedXor64
410#define _InterlockedXor64 _InlineInterlockedXor64
413_InlineInterlockedXor64(
418 for (Old = *
Target; ; Old = Prev)
427#undef _InterlockedIncrement64
428#define _InterlockedIncrement64 _InlineInterlockedIncrement64
431_InlineInterlockedIncrement64(
434 return _InterlockedAdd64(
Target, 1);
437#undef _InterlockedDecrement64
438#define _InterlockedDecrement64 _InlineInterlockedDecrement64
441_InlineInterlockedDecrement64(
444 return _InterlockedAdd64(
Target, -1);
447#undef _InterlockedExchangePointer
448#define _InterlockedExchangePointer _InlineInterlockedExchangePointer
461#undef _InterlockedCompareExchangePointer
462#define _InterlockedCompareExchangePointer _InlineInterlockedCompareExchangePointer
496#undef _InterlockedBitTestAndSet
497#define _InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
500_InterlockedBitTestAndSet(
508#undef _InterlockedBitTestAndReset
509#define _InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
512_InterlockedBitTestAndReset(
520#undef _InterlockedBitTestAndSet64
521#define _InterlockedBitTestAndSet64 InterlockedBitTestAndSet64_Inline
524_InterlockedBitTestAndSet64(
532#undef _InterlockedBitTestAndReset64
533#define _InterlockedBitTestAndReset64 InterlockedBitTestAndReset64_Inline
536_InterlockedBitTestAndReset64(
544#undef _InterlockedBitTestAndComplement
545#define _InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
548_InterlockedBitTestAndComplement(
556#undef _InterlockedBitTestAndComplement64
557#define _InterlockedBitTestAndComplement64 InterlockedBitTestAndComplement64_Inline
560_InterlockedBitTestAndComplement64(
#define InterlockedExchange
#define InterlockedCompareExchange
long __cdecl _InterlockedExchangeAdd(_Interlocked_operand_ long volatile *_Addend, long _Value)
void * _InterlockedCompareExchangePointer(_Interlocked_operand_ void *volatile *_Destination, void *_Exchange, void *_Comparand)
void * _InterlockedExchangePointer(_Interlocked_operand_ void *volatile *_Target, void *_Value)
__int64 _InterlockedCompareExchange64(_Interlocked_operand_ __int64 volatile *_Destination, __int64 _Exchange, __int64 _Comparand)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
#define _Post_writable_byte_size_(s)
#define _Pre_writable_byte_size_(s)
#define _Interlocked_operand_
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value