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#define InterlockedAdd _InterlockedAdd
53#define InterlockedAddAcquire __ACQ_(_InterlockedAdd)
54#define InterlockedAddRelease __REL_(_InterlockedAdd)
55#define InterlockedAddNoFence __NF_(_InterlockedAdd)
57#define InterlockedAdd64 _InterlockedAdd64
58#define InterlockedAddAcquire64 __ACQ_(_InterlockedAdd64)
59#define InterlockedAddRelease64 __REL_(_InterlockedAdd64)
60#define InterlockedAddNoFence64 __NF_(_InterlockedAdd64)
62#define InterlockedAnd _InterlockedAnd
63#define InterlockedAndAcquire __ACQ_(_InterlockedAnd)
64#define InterlockedAndRelease __REL_(_InterlockedAnd)
65#define InterlockedAndNoFence __NF_(_InterlockedAnd)
67#define InterlockedAnd8 _InterlockedAnd8
69#define InterlockedAndAcquire8 _InterlockedAnd8_acq
70#define InterlockedAndRelease8 _InterlockedAnd8_rel
71#define InterlockedAndNoFence8 _InterlockedAnd8_nf
73#define InterlockedAnd8Acquire _InterlockedAnd8_acq
74#define InterlockedAnd8Release _InterlockedAnd8_rel
77#define InterlockedAnd16 _InterlockedAnd16
79#define InterlockedAndAcquire16 _InterlockedAnd16_acq
80#define InterlockedAndRelease16 _InterlockedAnd16_rel
81#define InterlockedAndNoFence16 _InterlockedAnd16_nf
83#define InterlockedAnd16Acquire _InterlockedAnd16_acq
84#define InterlockedAnd16Release _InterlockedAnd16_rel
87#define InterlockedAnd64 _InterlockedAnd64
89#define InterlockedAndAcquire64 __ACQ_(_InterlockedAnd64)
90#define InterlockedAndRelease64 __REL_(_InterlockedAnd64)
91#define InterlockedAndNoFence64 __NF_(_InterlockedAnd64)
93#define InterlockedAnd64Acquire __ACQ_(_InterlockedAnd64)
94#define InterlockedAnd64Release __REL_(_InterlockedAnd64)
95#define InterlockedAnd64NoFence __NF_(_InterlockedAnd64)
99#define InterlockedAndAffinity InterlockedAnd64
101#define InterlockedAndAffinity InterlockedAnd
104#define InterlockedCompareExchange _InterlockedCompareExchange
105#define InterlockedCompareExchangeAcquire __ACQ_(_InterlockedCompareExchange)
106#define InterlockedCompareExchangeRelease __REL_(_InterlockedCompareExchange)
107#define InterlockedCompareExchangeNoFence __NF_(_InterlockedCompareExchange)
109#define InterlockedCompareExchange16 _InterlockedCompareExchange16
110#define InterlockedCompareExchangeAcquire16 __ACQ_(_InterlockedCompareExchange16)
111#define InterlockedCompareExchangeRelease16 __REL_(_InterlockedCompareExchange16)
112#define InterlockedCompareExchangeNoFence16 __NF_(_InterlockedCompareExchange16)
114#define InterlockedCompareExchange64 _InterlockedCompareExchange64
115#define InterlockedCompareExchangeAcquire64 __ACQ_(_InterlockedCompareExchange64)
116#define InterlockedCompareExchangeRelease64 __REL_(_InterlockedCompareExchange64)
117#define InterlockedCompareExchangeNoFence64 __NF_(_InterlockedCompareExchange64)
120#define InterlockedCompareExchange128 _InterlockedCompareExchange128
124#define InterlockedCompare64Exchange128 _InterlockedCompare64Exchange128
125#define InterlockedCompare64ExchangeAcquire128 _InterlockedCompare64Exchange128_acq
126#define InterlockedCompare64ExchangeRelease128 _InterlockedCompare64Exchange128_rel
129#define InterlockedCompareExchangePointer _InterlockedCompareExchangePointer
130#define InterlockedCompareExchangePointerAcquire __ACQ_(_InterlockedCompareExchangePointer)
131#define InterlockedCompareExchangePointerRelease __REL_(_InterlockedCompareExchangePointer)
132#define InterlockedCompareExchangePointerNoFence __NF_(_InterlockedCompareExchangePointer)
134#define InterlockedDecrement _InterlockedDecrement
135#define InterlockedDecrementAcquire __ACQ_(_InterlockedDecrement)
136#define InterlockedDecrementRelease __REL_(_InterlockedDecrement)
137#define InterlockedDecrementNoFence __NF_(_InterlockedDecrement)
139#define InterlockedDecrement16 _InterlockedDecrement16
140#define InterlockedDecrementAcquire16 __ACQ_(_InterlockedDecrement16)
141#define InterlockedDecrementRelease16 __REL_(_InterlockedDecrement16)
142#define InterlockedDecrementNoFence16 __NF_(_InterlockedDecrement16)
144#define InterlockedDecrement64 _InterlockedDecrement64
145#define InterlockedDecrementAcquire64 __ACQ_(_InterlockedDecrement64)
146#define InterlockedDecrementRelease64 __REL_(_InterlockedDecrement64)
147#define InterlockedDecrementNoFence64 __NF_(_InterlockedDecrement64)
150#define InterlockedDecrementSizeT(a) InterlockedDecrement64((LONG64 *)a)
151#define InterlockedDecrementSizeTNoFence(a) InterlockedDecrementNoFence64((LONG64 *)a)
153#define InterlockedDecrementSizeT(a) InterlockedDecrement((LONG *)a)
154#define InterlockedDecrementSizeTNoFence(a) InterlockedDecrementNoFence((LONG *)a)
157#define InterlockedExchange _InterlockedExchange
158#define InterlockedExchangeAcquire __ACQ_(_InterlockedExchange)
160#define InterlockedExchangeNoFence __NF_(_InterlockedExchange)
162#if (_MSC_VER >= 1600)
163#define InterlockedExchange8 _InterlockedExchange8
166#define InterlockedExchange16 _InterlockedExchange16
168#define InterlockedExchangeAcquire16 __ACQ_(_InterlockedExchange16)
169#define InterlockedExchangeNoFence16 __NF_(_InterlockedExchange16)
171#define InterlockedExchange64 _InterlockedExchange64
172#define InterlockedExchangeAcquire64 __ACQ_(_InterlockedExchange64)
174#define InterlockedExchangeNoFence64 __NF_(_InterlockedExchange64)
176#define InterlockedExchangePointer _InterlockedExchangePointer
177#define InterlockedExchangePointerAcquire __ACQ_(_InterlockedExchangePointer)
179#define InterlockedExchangePointerNoFence __NF_(_InterlockedExchangePointer)
181#define InterlockedExchangeAdd _InterlockedExchangeAdd
182#define InterlockedExchangeAddAcquire __ACQ_(_InterlockedExchangeAdd)
183#define InterlockedExchangeAddRelease __REL_(_InterlockedExchangeAdd)
184#define InterlockedExchangeAddNoFence __NF_(_InterlockedExchangeAdd)
186#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
187#define InterlockedExchangeAddAcquire64 __ACQ_(_InterlockedExchangeAdd64)
188#define InterlockedExchangeAddRelease64 __REL_(_InterlockedExchangeAdd64)
189#define InterlockedExchangeAddNoFence64 __NF_(_InterlockedExchangeAdd64)
192#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd64((LONG64 *)a, b)
193#define InterlockedExchangeAddSizeTAcquire(a, b) InterlockedExchangeAddAcquire64((LONG64 *)a, b)
194#define InterlockedExchangeAddSizeTNoFence(a, b) InterlockedExchangeAddNoFence64((LONG64 *)a, b)
196#define InterlockedExchangeAddSizeT(a, b) InterlockedExchangeAdd((LONG *)a, b)
197#define InterlockedExchangeAddSizeTAcquire(a, b) InterlockedExchangeAddAcquire((LONG *)a, b)
198#define InterlockedExchangeAddSizeTNoFence(a, b) InterlockedExchangeAddNoFence((LONG *)a, b)
201#define InterlockedIncrement _InterlockedIncrement
202#define InterlockedIncrementAcquire __ACQ_(_InterlockedIncrement)
203#define InterlockedIncrementRelease __REL_(_InterlockedIncrement)
204#define InterlockedIncrementNoFence __NF_(_InterlockedIncrement)
206#define InterlockedIncrement16 _InterlockedIncrement16
207#define InterlockedIncrementAcquire16 __ACQ_(_InterlockedIncrement16)
208#define InterlockedIncrementRelease16 __REL_(_InterlockedIncrement16)
209#define InterlockedIncrementNoFence16 __NF_(_InterlockedIncrement16)
211#define InterlockedIncrement64 _InterlockedIncrement64
212#define InterlockedIncrementAcquire64 __ACQ_(_InterlockedIncrement64)
213#define InterlockedIncrementRelease64 __REL_(_InterlockedIncrement64)
214#define InterlockedIncrementNoFence64 __NF_(_InterlockedIncrement64)
217#define InterlockedIncrementSizeT(a) InterlockedIncrement64((LONG64 *)a)
218#define InterlockedIncrementSizeTNoFence(a) InterlockedIncrementNoFence64((LONG64 *)a)
220#define InterlockedIncrementSizeT(a) InterlockedIncrement((LONG *)a)
221#define InterlockedIncrementSizeTNoFence(a) InterlockedIncrementNoFence((LONG *)a)
224#define InterlockedOr _InterlockedOr
225#define InterlockedOrAcquire __ACQ_(_InterlockedOr)
226#define InterlockedOrRelease __REL_(_InterlockedOr)
227#define InterlockedOrNoFence __NF_(_InterlockedOr)
229#define InterlockedOr8 _InterlockedOr8
231#define InterlockedOrAcquire8 _InterlockedOr8_acq
232#define InterlockedOrRelease8 _InterlockedOr8_rel
233#define InterlockedOrNoFence8 _InterlockedOr8_nf
234#elif defined(_M_IA64)
235#define InterlockedOr8Acquire _InterlockedOr8_acq
236#define InterlockedOr8Release _InterlockedOr8_rel
239#define InterlockedOr16 _InterlockedOr16
241#define InterlockedOrAcquire16 _InterlockedOr16_acq
242#define InterlockedOrRelease16 _InterlockedOr16_rel
243#define InterlockedOrNoFence16 _InterlockedOr16_nf
244#elif defined(_M_IA64)
245#define InterlockedOr16Acquire _InterlockedOr16_acq
246#define InterlockedOr16Release _InterlockedOr16_rel
249#define InterlockedOr64 _InterlockedOr64
251#define InterlockedOrAcquire64 _InterlockedOr64_acq
252#define InterlockedOrRelease64 _InterlockedOr64_rel
253#define InterlockedOrNoFence64 _InterlockedOr64_nf
254#elif defined(_M_IA64) || defined(_M_AMD64)
255#define InterlockedOr64Acquire __ACQ_(_InterlockedOr64)
256#define InterlockedOr64Release __REL_(_InterlockedOr64)
257#define InterlockedOr64NoFence __NF_(_InterlockedOr64)
261#define InterlockedOrAffinity InterlockedOr64
263#define InterlockedOrAffinity InterlockedOr
266#define InterlockedXor _InterlockedXor
267#define InterlockedXorAcquire __ACQ_(_InterlockedXor)
268#define InterlockedXorRelease __REL_(_InterlockedXor)
269#define InterlockedXorNoFence __NF_(_InterlockedXor)
271#define InterlockedXor8 _InterlockedXor8
273#define InterlockedXorAcquire8 _InterlockedXor8_acq
274#define InterlockedXorRelease8 _InterlockedXor8_rel
275#define InterlockedXorNoFence8 _InterlockedXor8_nf
276#elif defined(_M_IA64)
277#define InterlockedXor8Acquire _InterlockedXor8_acq
278#define InterlockedXor8Release _InterlockedXor8_rel
281#define InterlockedXor16 _InterlockedXor16
283#define InterlockedXorAcquire16 _InterlockedXor16_acq
284#define InterlockedXorRelease16 _InterlockedXor16_rel
285#define InterlockedXorNoFence16 _InterlockedXor16_nf
286#elif defined(_M_IA64)
287#define InterlockedXor16Acquire _InterlockedXor16_acq
288#define InterlockedXor16Release _InterlockedXor16_rel
291#define InterlockedXor64 _InterlockedXor64
293#define InterlockedXorAcquire64 _InterlockedXor64_acq
294#define InterlockedXorRelease64 _InterlockedXor64_rel
295#define InterlockedXorNoFence64 _InterlockedXor64_nf
296#elif defined(_M_IA64) || defined(_M_AMD64)
297#define InterlockedXor64Acquire __ACQ_(_InterlockedXor64)
298#define InterlockedXor64Release __REL_(_InterlockedXor64)
299#define InterlockedXor64NoFence __NF_(_InterlockedXor64)
304#undef _InterlockedExchange64
305#define _InterlockedExchange64 _InlineInterlockedExchange64
308_InlineInterlockedExchange64(
313 for (Old = *
Target; ; Old = Prev)
321#undef _InterlockedAdd64
322#define _InterlockedAdd64 _InlineInterlockedAdd64
325_InlineInterlockedAdd64(
330 for (Old = *
Target; ; Old = Prev)
339#undef _InterlockedExchangeAdd64
340#define _InterlockedExchangeAdd64 _InlineInterlockedExchangeAdd64
343_InlineInterlockedExchangeAdd64(
349 for (Old = *
Target; ; Old = Prev)
358#undef _InterlockedAnd64
359#define _InterlockedAnd64 _InlineInterlockedAnd64
362_InlineInterlockedAnd64(
367 for (Old = *
Target; ; Old = Prev)
376#undef _InterlockedOr64
377#define _InterlockedOr64 _InlineInterlockedOr64
380_InlineInterlockedOr64(
385 for (Old = *
Target; ; Old = Prev)
394#undef _InterlockedXor64
395#define _InterlockedXor64 _InlineInterlockedXor64
398_InlineInterlockedXor64(
403 for (Old = *
Target; ; Old = Prev)
412#undef _InterlockedIncrement64
413#define _InterlockedIncrement64 _InlineInterlockedIncrement64
416_InlineInterlockedIncrement64(
419 return _InterlockedAdd64(
Target, 1);
422#undef _InterlockedDecrement64
423#define _InterlockedDecrement64 _InlineInterlockedDecrement64
426_InlineInterlockedDecrement64(
429 return _InterlockedAdd64(
Target, -1);
432#undef _InterlockedExchangePointer
433#define _InterlockedExchangePointer _InlineInterlockedExchangePointer
446#undef _InterlockedCompareExchangePointer
447#define _InterlockedCompareExchangePointer _InlineInterlockedCompareExchangePointer
481#undef _InterlockedBitTestAndSet
482#define _InterlockedBitTestAndSet InterlockedBitTestAndSet_Inline
485_InterlockedBitTestAndSet(
493#undef _InterlockedBitTestAndReset
494#define _InterlockedBitTestAndReset InterlockedBitTestAndReset_Inline
497_InterlockedBitTestAndReset(
505#undef _InterlockedBitTestAndSet64
506#define _InterlockedBitTestAndSet64 InterlockedBitTestAndSet64_Inline
509_InterlockedBitTestAndSet64(
517#undef _InterlockedBitTestAndReset64
518#define _InterlockedBitTestAndReset64 InterlockedBitTestAndReset64_Inline
521_InterlockedBitTestAndReset64(
529#undef _InterlockedBitTestAndComplement
530#define _InterlockedBitTestAndComplement InterlockedBitTestAndComplement_Inline
533_InterlockedBitTestAndComplement(
541#undef _InterlockedBitTestAndComplement64
542#define _InterlockedBitTestAndComplement64 InterlockedBitTestAndComplement64_Inline
545_InterlockedBitTestAndComplement64(
#define InterlockedExchange
#define InterlockedCompareExchange
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