Define nxt_cpu_pause for ARM64.
The isb instruction fits for spin loops where it allows to save cpu power. Reviewed-by: Andrew Clayton <a.clayton@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
This commit is contained in:
committed by
Andrew Clayton
parent
5cfad9cc0b
commit
dfdf948f89
@@ -58,6 +58,10 @@ typedef volatile nxt_atomic_uint_t nxt_atomic_t;
|
|||||||
#define nxt_cpu_pause() \
|
#define nxt_cpu_pause() \
|
||||||
__asm__ ("pause")
|
__asm__ ("pause")
|
||||||
|
|
||||||
|
#elif (__aarch64__ || __arm64__)
|
||||||
|
#define nxt_cpu_pause() \
|
||||||
|
__asm__ ("isb")
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define nxt_cpu_pause()
|
#define nxt_cpu_pause()
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user