Skip to content

Commit 0e9268e

Browse files
committed
arm64:fix exchange_strong
Signed-off-by: liuyuncheng <[email protected]>
1 parent 67026ef commit 0e9268e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opal/include/opal/sys/arm64/atomic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static inline bool opal_atomic_compare_exchange_strong_32(opal_atomic_int32_t *a
7373
__asm__ __volatile__("1: ldaxr %w0, [%2] \n"
7474
" cmp %w0, %w3 \n"
7575
" bne 2f \n"
76-
" stxr %w1, %w4, [%2] \n"
76+
" stlxr %w1, %w4, [%2] \n"
7777
" cbnz %w1, 1b \n"
7878
"2: \n"
7979
: "=&r"(prev), "=&r"(tmp)
@@ -142,7 +142,7 @@ static inline bool opal_atomic_compare_exchange_strong_64(opal_atomic_int64_t *a
142142
__asm__ __volatile__("1: ldaxr %0, [%2] \n"
143143
" cmp %0, %3 \n"
144144
" bne 2f \n"
145-
" stxr %w1, %4, [%2] \n"
145+
" stlxr %w1, %4, [%2] \n"
146146
" cbnz %w1, 1b \n"
147147
"2: \n"
148148
: "=&r"(prev), "=&r"(tmp)

0 commit comments

Comments
 (0)