aarch64: Implement caa_cpu_relax as yield instruction
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 May 2023 16:05:10 +0000 (12:05 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 31 May 2023 16:05:10 +0000 (12:05 -0400)
Use the aarch64 "yield" instruction which has the wanted semantic for
caa_cpu_relax.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I9852ae3170d4cc2207f8120355b51c1d0e5e5506

include/urcu/arch/aarch64.h

index 9e2f1ffdb6d09ee93c12692a77db3866a69de9e3..e1925b30ddbc0018456228323c3d274581897fa4 100644 (file)
@@ -51,6 +51,8 @@ extern "C" {
 # endif
 #endif
 
+#define caa_cpu_relax()        __asm__ __volatile__ ("yield" : : : "memory")
+
 #ifdef __cplusplus
 }
 #endif
This page took 0.025139 seconds and 4 git commands to generate.