]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
mips: fcmpset: do not spin on sc failure
authorKyle Evans <kevans@FreeBSD.org>
Wed, 2 Oct 2019 15:13:40 +0000 (15:13 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Wed, 6 Oct 2021 19:46:06 +0000 (14:46 -0500)
commit5bf3f2498adea0087a3ac1e3eaffdfc412b9dfe3
tree3ac59522c84d8e2d1312d39784d170693e7d22dd
parent141443a6dd4afc5139e5955efc9d27a61326646f
mips: fcmpset: do not spin on sc failure

For ll/sc architectures, atomic(9) allows failure modes where *old == val
due to write failure and callers should compensate for this. Do not retry on
failure, just leave 0 in ret and fail the operation if we couldn't sc it.
This lets the caller determine if it should retry or not.

(cherry picked from commit 22c2c971a614a72875787e0fd0001906451ee245)
sys/mips/include/atomic.h