Skip to content

Commit

Permalink
Fix build issue on M1 macs
Browse files Browse the repository at this point in the history
  • Loading branch information
greg7mdp authored and manojsdoshi committed Apr 6, 2022
1 parent 9d3cd71 commit 525aaec
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ripple/shamap/impl/SHAMapInnerNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
#include <iterator>
#include <utility>

#ifndef __aarch64__
// This is used for the _mm_pause instruction:
#include <immintrin.h>
#endif

namespace ripple {

Expand Down Expand Up @@ -100,7 +102,9 @@ class SpinBitlock
if (try_lock())
return;

#ifndef __aarch64__
_mm_pause();
#endif
}

std::this_thread::yield();
Expand Down

0 comments on commit 525aaec

Please sign in to comment.