From: Mathieu Desnoyers Date: Wed, 31 May 2023 16:05:10 +0000 (-0400) Subject: aarch64: Implement caa_cpu_relax as yield instruction X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e8363ee3e56dd3532147aa5704cf8107801ded9d;p=userspace-rcu.git aarch64: Implement caa_cpu_relax as yield instruction Use the aarch64 "yield" instruction which has the wanted semantic for caa_cpu_relax. Signed-off-by: Mathieu Desnoyers Change-Id: I9852ae3170d4cc2207f8120355b51c1d0e5e5506 --- diff --git a/include/urcu/arch/aarch64.h b/include/urcu/arch/aarch64.h index 9e2f1ff..e1925b3 100644 --- a/include/urcu/arch/aarch64.h +++ b/include/urcu/arch/aarch64.h @@ -51,6 +51,8 @@ extern "C" { # endif #endif +#define caa_cpu_relax() __asm__ __volatile__ ("yield" : : : "memory") + #ifdef __cplusplus } #endif