We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 430ee31 commit 0af9991Copy full SHA for 0af9991
1 file changed
common_arm64.h
@@ -53,16 +53,16 @@ static void __inline blas_lock(volatile BLASULONG *address){
53
BLASULONG ret;
54
55
do {
56
- while (*address) {YIELDING;};
57
-
58
__asm__ __volatile__(
59
"mov x4, #1 \n\t"
+ "sevl \n\t"
60
"1: \n\t"
+ "wfe \n\t"
61
+ "2: \n\t"
62
"ldaxr x2, [%1] \n\t"
63
"cbnz x2, 1b \n\t"
- "2: \n\t"
64
"stxr w3, x4, [%1] \n\t"
65
- "cbnz w3, 1b \n\t"
+ "cbnz w3, 2b \n\t"
66
"mov %0, #0 \n\t"
67
: "=r"(ret), "=r"(address)
68
: "1"(address)
0 commit comments