Skip to content

Commit

Permalink
opal/asm/arm64: Fix opal_atomic_compare_exchange_* bug
Browse files Browse the repository at this point in the history
Signed-off-by: KAWASHIMA Takahiro <t-kawashima@jp.fujitsu.com>
  • Loading branch information
kawashima-fj committed Dec 5, 2017
1 parent 2c86b87 commit 08254e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions opal/include/opal/sys/arm64/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ static inline bool opal_atomic_compare_exchange_strong_64 (volatile int64_t *add
: "r" (addr), "r" (*oldval), "r" (newval)
: "cc", "memory");

ret = (prev == oldval);
ret = (prev == *oldval);
*oldval = prev;
return ret;
}
Expand Down Expand Up @@ -242,7 +242,7 @@ static inline bool opal_atomic_compare_exchange_strong_acq_64 (volatile int64_t
: "r" (addr), "r" (*oldval), "r" (newval)
: "cc", "memory");

ret = (prev == oldval);
ret = (prev == *oldval);
*oldval = prev;
return ret;
}
Expand All @@ -264,7 +264,7 @@ static inline bool opal_atomic_compare_exchange_strong_rel_64 (volatile int64_t
: "r" (addr), "r" (*oldval), "r" (newval)
: "cc", "memory");

ret = (prev == oldval);
ret = (prev == *oldval);
*oldval = prev;
return ret;
}
Expand Down

0 comments on commit 08254e8

Please sign in to comment.