Skip to content

Commit

Permalink
Fix winnt_arm64.h
Browse files Browse the repository at this point in the history
  • Loading branch information
ntoskrnl7 committed May 29, 2022
1 parent 495ffd1 commit e6907dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/Ldk/winnt_arm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ _BitTestAndSet64(__int64 *Base, __int64 Index)
// are now generated as calls to glue code which already contain
// fixes for this oversight.
//
#if !defined(_WDMDDK_)
#define InterlockedBitTestAndSet64 _interlockedbittestandset64
#define InterlockedBitTestAndSet64Acquire _interlockedbittestandset64_acq
#define InterlockedBitTestAndSet64Release _interlockedbittestandset64_rel
Expand All @@ -116,6 +117,7 @@ _BitTestAndSet64(__int64 *Base, __int64 Index)
#define InterlockedBitTestAndReset64Acquire _interlockedbittestandreset64_acq
#define InterlockedBitTestAndReset64Release _interlockedbittestandreset64_rel
#define InterlockedBitTestAndReset64NoFence _interlockedbittestandreset64_nf
#endif // !defined(_WDMDDK_)

#pragma intrinsic(_bittest)
#pragma intrinsic(_bittestandcomplement)
Expand Down Expand Up @@ -489,9 +491,11 @@ _BitTestAndSet64(__int64 *Base, __int64 Index)
#pragma intrinsic(_WriteBarrier)

#define MemoryBarrier() __dmb(_ARM64_BARRIER_SY)
#if !defined(_WDMDDK_)
#define PreFetchCacheLine(l,a) __prefetch2((const void *) (a), ARM64_PREFETCH(PLD, L1, KEEP))
#define PrefetchForWrite(p) __prefetch2((const void *) (p), ARM64_PREFETCH(PST, L1, KEEP))
#define ReadForWriteAccess(p) (__prefetch2((const void *) (p), ARM64_PREFETCH(PST, L1, KEEP)), *(p))
#endif // !defined(_WDMDDK_)

#define _DataSynchronizationBarrier() __dsb(_ARM64_BARRIER_SY)
#define _InstructionSynchronizationBarrier() __isb(_ARM64_BARRIER_SY)
Expand Down

0 comments on commit e6907dc

Please sign in to comment.