7#define KeMemoryBarrierWithoutFence() _ReadWriteBarrier()
9#if defined(_M_IX86) || defined(_M_AMD64)
10#define PreFetchCacheLine(l, a) _mm_prefetch((char const *) a, l)
11#define PF_TEMPORAL_LEVEL_1 _MM_HINT_T0
12#define PF_TEMPORAL_LEVEL_2 _MM_HINT_T1
13#define PF_TEMPORAL_LEVEL_3 _MM_HINT_T2
14#define PF_NON_TEMPORAL_LEVEL_ALL _MM_HINT_NTA
15#define _AcquireBarrier()
16#define _ReleaseBarrier()
17#elif defined(_M_ARM) || defined(_M_ARM64)
18#define PreFetchCacheLine(l,a) __prefetch((const void *) (a))
19#define PrefetchForWrite(p) __prefetch((const void *) (p))
20#define PF_TEMPORAL_LEVEL_1 0
21#define PF_TEMPORAL_LEVEL_2 1
22#define PF_TEMPORAL_LEVEL_3 2
23#define PF_NON_TEMPORAL_LEVEL_ALL 3
24#define ReadForWriteAccess(p) (*(p))
27#if !defined(RC_INVOKED)
38#define PrefetchForWrite(p)
39#define ReadForWriteAccess(p) (*(p))
40#elif defined(_M_AMD64)
41#define MemoryBarrier __faststorefence
42#define PrefetchForWrite(p) _m_prefetchw(p)
43#define ReadForWriteAccess(p) (_m_prefetchw(p), *(p))
45# define MemoryBarrier() __dmb(_ARM_BARRIER_SY)
46# define _AcquireBarrier() __dmb(_ARM_BARRIER_ISH)
47# define _ReleaseBarrier() __dmb(_ARM_BARRIER_ISH)
48# define _DataSynchronizationBarrier() __dsb(_ARM_BARRIER_SY)
49# define _InstructionSynchronizationBarrier() __isb(_ARM_BARRIER_SY)
50#elif defined(_M_ARM64)
51# define MemoryBarrier() __dmb(_ARM64_BARRIER_SY)
52# define _AcquireBarrier() __dmb(_ARM64_BARRIER_ISH)
53# define _ReleaseBarrier() __dmb(_ARM64_BARRIER_ISH)
54# define _DataSynchronizationBarrier() __dsb(_ARM64_BARRIER_SY)
55# define _InstructionSynchronizationBarrier() __isb(_ARM64_BARRIER_SY)
57#error Unsupported architecture
60#if defined(_M_IX86) || defined(_M_AMD64)
61#define __iso_volatile_load8(p) (*(volatile char*)(p))
62#define __iso_volatile_load16(p) (*(volatile short*)(p))
63#define __iso_volatile_load32(p) (*(volatile int*)(p))
64#define __iso_volatile_load64(p) (*(volatile __int64*)(p))
65#define __iso_volatile_store8(p,v) (*(volatile char*)(p) = (v))
66#define __iso_volatile_store16(p,v) (*(volatile short*)(p) = (v))
67#define __iso_volatile_store32(p,v) (*(volatile int*)(p) = (v))
68#define __iso_volatile_store64(p,v) (*(volatile __int64*)(p) = (v))
310 return (
unsigned char)ReadRaw8((
char*)
Source);
580#define ReadLongPtrAcquire ReadAcquire64
581#define ReadLongPtrNoFence ReadNoFence64
582#define ReadLongPtrRaw ReadRaw64
583#define WriteLongPtrRelease WriteRelease64
584#define WriteLongPtrNoFence WriteNoFence64
585#define WriteLongPtrRaw WriteRaw64
586#define ReadULongPtrAcquire ReadULong64Acquire
587#define ReadULongPtrNoFence ReadULong64NoFence
588#define ReadULongPtrRaw ReadULong64Raw
589#define WriteULongPtrRelease WriteULong64Release
590#define WriteULongPtrNoFence WriteULong64NoFence
591#define WriteULongPtrRaw WriteULong64Raw
646#define ReadLongPtrAcquire ReadAcquire
647#define ReadLongPtrNoFence ReadNoFence
648#define ReadLongPtrRaw ReadRaw
649#define WriteLongPtrRelease WriteRelease
650#define WriteLongPtrNoFence WriteNoFence
651#define WriteLongPtrRaw WriteRaw
652#define ReadULongPtrAcquire ReadULongAcquire
653#define ReadULongPtrNoFence ReadULongNoFence
654#define ReadULongPtrRaw ReadULongRaw
655#define WriteULongPtrRelease WriteULongRelease
656#define WriteULongPtrNoFence WriteULongNoFence
657#define WriteULongPtrRaw WriteULongRaw
661#define ReadSizeTAcquire ReadULongPtrAcquire
662#define ReadSizeTNoFence ReadULongPtrNoFence
663#define ReadSizeTRaw ReadULongPtrRaw
664#define WriteSizeTRelease WriteULongPtrRelease
665#define WriteSizeTNoFence WriteULongPtrNoFence
666#define WriteSizeTRaw WriteULongPtrRaw
669#if defined(__cplusplus)
727#undef _AcquireBarrier
728#undef _ReleaseBarrier
__int8 __iso_volatile_load8(const volatile __int8 *)
__int64 __iso_volatile_load64(const volatile __int64 *)
void __iso_volatile_store8(volatile __int8 *, __int8)
void __iso_volatile_store32(volatile __int32 *, __int32)
__int32 __iso_volatile_load32(const volatile __int32 *)
__int16 __iso_volatile_load16(const volatile __int16 *)
void __iso_volatile_store64(volatile __int64 *, __int64)
void __iso_volatile_store16(volatile __int16 *, __int16)
long _InterlockedOr(_Interlocked_operand_ long volatile *_Value, long _Mask)
__forceinline short ReadAcquire16(_In_ _Interlocked_operand_ short const volatile *Source)
__forceinline long ReadNoFence(_In_ _Interlocked_operand_ long const volatile *Source)
__forceinline void WritePointerNoFence(_Out_ _Interlocked_operand_ void *volatile *Destination, _In_opt_ void *Value)
__forceinline unsigned char ReadUCharAcquire(_In_ _Interlocked_operand_ unsigned char const volatile *Source)
__forceinline void WriteUShortRaw(_Out_ _Interlocked_operand_ unsigned short volatile *Destination, _In_ unsigned short Value)
__forceinline unsigned long ReadULongAcquire(_In_ _Interlocked_operand_ unsigned long const volatile *Source)
__forceinline void WriteULongRaw(_Out_ _Interlocked_operand_ unsigned long volatile *Destination, _In_ unsigned long Value)
__forceinline void WriteRelease(_Out_ _Interlocked_operand_ long volatile *Destination, _In_ long Value)
__forceinline void WriteRelease64(_Out_ _Interlocked_operand_ __int64 volatile *Destination, _In_ __int64 Value)
__forceinline void WriteNoFence64(_Out_ _Interlocked_operand_ __int64 volatile *Destination, _In_ __int64 Value)
__forceinline void WritePointerRelease(_Out_ _Interlocked_operand_ void *volatile *Destination, _In_ void *Value)
__forceinline long ReadAcquire(_In_ _Interlocked_operand_ long const volatile *Source)
__forceinline void * ReadPointerNoFence(_In_ _Interlocked_operand_ void *const volatile *Source)
__forceinline unsigned short ReadUShortNoFence(_In_ _Interlocked_operand_ unsigned short const volatile *Source)
__forceinline void WriteUCharRelease(_Out_ _Interlocked_operand_ unsigned char volatile *Destination, _In_ unsigned char Value)
__forceinline void WriteNoFence(_Out_ _Interlocked_operand_ long volatile *Destination, _In_ long Value)
__forceinline void * ReadPointerRaw(_In_ _Interlocked_operand_ void *const volatile *Source)
__forceinline void WriteULong64NoFence(_Out_ _Interlocked_operand_ unsigned __int64 volatile *Destination, _In_ unsigned __int64 Value)
__forceinline void WritePointerRaw(_Out_ _Interlocked_operand_ void *volatile *Destination, _In_opt_ void *Value)
__forceinline unsigned __int64 ReadULong64Raw(_In_ _Interlocked_operand_ unsigned __int64 const volatile *Source)
__forceinline void WriteRelease16(_Out_ _Interlocked_operand_ short volatile *Destination, _In_ short Value)
__forceinline unsigned long ReadULongNoFence(_In_ _Interlocked_operand_ unsigned long const volatile *Source)
__forceinline void WriteBooleanNoFence(_Out_ _Interlocked_operand_ BOOLEAN volatile *Destination, _In_ BOOLEAN Value)
__forceinline __int64 ReadRaw64(_In_ _Interlocked_operand_ __int64 const volatile *Source)
__forceinline short ReadNoFence16(_In_ _Interlocked_operand_ short const volatile *Source)
__forceinline char ReadNoFence8(_In_ _Interlocked_operand_ char const volatile *Source)
__forceinline void WriteUCharNoFence(_Out_ _Interlocked_operand_ unsigned char volatile *Destination, _In_ unsigned char Value)
__forceinline void WriteULongRelease(_Out_ _Interlocked_operand_ unsigned long volatile *Destination, _In_ unsigned long Value)
__forceinline __int64 ReadAcquire64(_In_ _Interlocked_operand_ __int64 const volatile *Source)
__forceinline void WriteRelease8(_Out_ _Interlocked_operand_ char volatile *Destination, _In_ char Value)
__forceinline unsigned char ReadUCharNoFence(_In_ _Interlocked_operand_ unsigned char const volatile *Source)
__forceinline void WriteRaw8(_Out_ _Interlocked_operand_ char volatile *Destination, _In_ char Value)
__forceinline unsigned __int64 ReadULong64Acquire(_In_ _Interlocked_operand_ unsigned __int64 const volatile *Source)
__forceinline void WriteULong64Raw(_Out_ _Interlocked_operand_ unsigned __int64 volatile *Destination, _In_ unsigned __int64 Value)
__forceinline void WriteRaw64(_Out_ _Interlocked_operand_ __int64 volatile *Destination, _In_ __int64 Value)
__forceinline __int64 ReadNoFence64(_In_ _Interlocked_operand_ __int64 const volatile *Source)
__forceinline void WriteNoFence8(_Out_ _Interlocked_operand_ char volatile *Destination, _In_ char Value)
$if(0) $endif() __forceinline char ReadRaw8(_In_ _Interlocked_operand_ char const volatile *Source)
__forceinline void * ReadPointerAcquire(_In_ _Interlocked_operand_ void *const volatile *Source)
__forceinline void WriteUShortRelease(_Out_ _Interlocked_operand_ unsigned short volatile *Destination, _In_ unsigned short Value)
__forceinline unsigned char ReadUCharRaw(_In_ _Interlocked_operand_ unsigned char const volatile *Source)
__forceinline void WriteUCharRaw(_Out_ _Interlocked_operand_ unsigned char volatile *Destination, _In_ unsigned char Value)
__forceinline unsigned char ReadBooleanNoFence(_In_ _Interlocked_operand_ BOOLEAN const volatile *Source)
__forceinline unsigned short ReadUShortRaw(_In_ _Interlocked_operand_ unsigned short const volatile *Source)
__forceinline void WriteULongNoFence(_Out_ _Interlocked_operand_ unsigned long volatile *Destination, _In_ unsigned long Value)
__forceinline unsigned short ReadUShortAcquire(_In_ _Interlocked_operand_ unsigned short const volatile *Source)
__forceinline char ReadAcquire8(_In_ _Interlocked_operand_ char const volatile *Source)
__forceinline void WriteNoFence16(_Out_ _Interlocked_operand_ short volatile *Destination, _In_ short Value)
__forceinline unsigned long ReadULongRaw(_In_ _Interlocked_operand_ unsigned long const volatile *Source)
__forceinline void WriteUShortNoFence(_Out_ _Interlocked_operand_ unsigned short volatile *Destination, _In_ unsigned short Value)
__forceinline void WriteRaw16(_Out_ _Interlocked_operand_ short volatile *Destination, _In_ short Value)
__forceinline short ReadRaw16(_In_ _Interlocked_operand_ short const volatile *Source)
__forceinline BOOLEAN ReadBooleanAcquire(_In_ _Interlocked_operand_ BOOLEAN const volatile *Source)
__forceinline void WriteRaw(_Out_ _Interlocked_operand_ long volatile *Destination, _In_ long Value)
__forceinline void WriteULong64Release(_Out_ _Interlocked_operand_ unsigned __int64 volatile *Destination, _In_ unsigned __int64 Value)
__forceinline void WriteBooleanRelease(_Out_ _Interlocked_operand_ BOOLEAN volatile *Destination, _In_ BOOLEAN Value)
__forceinline long ReadRaw(_In_ _Interlocked_operand_ long const volatile *Source)
__forceinline unsigned __int64 ReadULong64NoFence(_In_ _Interlocked_operand_ unsigned __int64 const volatile *Source)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
#define _Interlocked_operand_
$endif(_WDMDDK_) $if(_NTDDK_) typedef struct _NEON128
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value