Skip to content

Commit

Permalink
Redefine _mm_pause to allow for ARM compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
dmaivel committed Mar 31, 2024
1 parent 9a814e0 commit aa7a2c0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/client/spinlock.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#include <client/spinlock.h>
#if defined(__x86_64__) || defined(_M_X64) || defined(i386) || defined(__i386__) || defined(__i386) || defined(_M_IX86)
#include <emmintrin.h>
#else
// #warning Non-x86 platform detected, assuming ARM.
#define _mm_pause() asm volatile("yield");
#endif

#ifdef _WIN32
#include <windows.h>
Expand Down

0 comments on commit aa7a2c0

Please sign in to comment.