HomeFreeBSD

mips: fcmpset: do not spin on sc failure

Description

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)

Details

Provenance
kevansAuthored on Oct 2 2019, 3:13 PM
Parents
rG141443a6dd4a: atomic_cmpset return value is also an int.
Branches
Unknown
Tags
Unknown