Use VarHandles in PingPongTransactionChain
Most of our accesses are compareAndSwap() so we do not benefit all
that much from ARFU type safety. Switch to using VarHandles to access
our atomic fields. Provide an acquireReadyTx() to deal with the few
call sites which would require explicit cast due to using getAndSet().
VarHandles allow us to use compareAndExchange(), which exposes the
witness value -- hence our error paths report the correct object without
a possibility of a race.
Change-Id: I79d2791f6e0d6accb987e46d31415452f735a7f8
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
4a94fedbe24344b6dbe67287a560daba8b99eb84)
(cherry picked from commit
89dc97e6bdfa7afb5e9557c6b207b9f3bbd0c434)