Nugget
compiler_msvc_cpu_pause.h
1 // copyright (c) electronic arts inc. all rights reserved.
4 
5 
6 #ifndef EASTL_ATOMIC_INTERNAL_COMPILER_MSVC_CPU_PAUSE_H
7 #define EASTL_ATOMIC_INTERNAL_COMPILER_MSVC_CPU_PAUSE_H
8 
9 #if defined(EA_PRAGMA_ONCE_SUPPORTED)
10  #pragma once
11 #endif
12 
13 
15 //
16 // void EASTL_COMPILER_ATOMIC_CPU_PAUSE()
17 //
18 // NOTE:
19 // Rather obscure macro in Windows.h that expands to pause or rep; nop on
20 // compatible x86 cpus or the arm yield on compatible arm processors.
21 // This is nicer than switching on platform specific intrinsics.
22 //
23 #define EASTL_COMPILER_ATOMIC_CPU_PAUSE() \
24  YieldProcessor()
25 
26 
27 #endif /* EASTL_ATOMIC_INTERNAL_COMPILER_MSVC_CPU_PAUSE_H */