Use cpu_relax() implementation for aarch64 (#11677)

Motivation:

We only implement cpu_relax() for x86_64 atm, we should also do for aarch64

Modifications:

Add implementation

Result:

Possible better performance on aarch64 when busy spinning with epoll is used
This commit is contained in:
Norman Maurer 2021-09-14 08:33:01 +02:00
parent 1eb128e2a9
commit a76842dcd5

View File

@ -287,6 +287,8 @@ static jint netty_epoll_native_epollWait0(JNIEnv* env, jclass clazz, jint efd, j
static inline void cpu_relax() {
#if defined(__x86_64__)
asm volatile("pause\n": : :"memory");
#elif defined(__aarch64__)
asm volatile("isb\n": : :"memory");
#endif
}