From e8363ee3e56dd3532147aa5704cf8107801ded9d Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 31 May 2023 12:05:10 -0400 Subject: [PATCH] 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 --- include/urcu/arch/aarch64.h | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.39.5