HomeFreeBSD

Use relaxed atomics to access the monitor line.

Description

Use relaxed atomics to access the monitor line.

We must ensure that accesses occur, they do not have any other
compiler-visible effects. Bruce found some situations where
optimization could remove an access, and provided a patch to use
volatile qualifier for the state variables. Since volatile behaviour
there is the compiler-specific interpretation of the keyword, use
relaxed atomics instead, which gives exactly the desired semantic.

Noted by and discussed with: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Details

Provenance
kibAuthored on
Parents
rS332933: MFC r332458:
Branches
Unknown
Tags
Unknown