Skip to content

Commit

Permalink
Merge pull request #3122 from STEllAR-GROUP/fixing_3121
Browse files Browse the repository at this point in the history
Fixing #3121
  • Loading branch information
sithhell committed Jan 24, 2018
2 parents 24ee1d0 + 4c7c746 commit a220e5b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hpx/config/compiler_fence.hpp
Expand Up @@ -26,7 +26,17 @@ extern "C" void _mm_pause();
#elif defined(__GNUC__)

#define HPX_COMPILER_FENCE __asm__ __volatile__( "" : : : "memory" )

#if defined(__i386__) || defined(__x86_64__)
#define HPX_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" )
#elif defined(__ppc__)
// According to: https://stackoverflow.com/questions/5425506/equivalent-of-x86-pause-instruction-for-ppc
#define HPX_SMT_PAUSE __asm__ __volatile__("or 27,27,27")
#elif defined(__arm__)
#define HPX_SMT_PAUSE __asm__ __volatile__("yield")
#else
#define HPX_SMT_PAUSE HPX_COMPILER_FENCE
#endif

#else

Expand Down

0 comments on commit a220e5b

Please sign in to comment.