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:
David CARLIER
2020-12-31 20:49:19 +00:00
committed by Andrew Clayton
parent 5cfad9cc0b
commit dfdf948f89

View File

@@ -58,6 +58,10 @@ typedef volatile nxt_atomic_uint_t nxt_atomic_t;
#define nxt_cpu_pause() \
__asm__ ("pause")
#elif (__aarch64__ || __arm64__)
#define nxt_cpu_pause() \
__asm__ ("isb")
#else
#define nxt_cpu_pause()
#endif