From 347537a5999622def42da47572ca49580c53f29c Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 30 Sep 2021 12:46:10 -0400 Subject: compiler: Improve Haddocks of atomic MachOps --- compiler/GHC/Cmm/MachOp.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/GHC/Cmm/MachOp.hs b/compiler/GHC/Cmm/MachOp.hs index b5aa278ad7..7004fece51 100644 --- a/compiler/GHC/Cmm/MachOp.hs +++ b/compiler/GHC/Cmm/MachOp.hs @@ -669,9 +669,11 @@ data CallishMachOp | MO_AtomicRMW Width AtomicMachOp | MO_AtomicRead Width | MO_AtomicWrite Width + -- | Atomic compare-and-swap. Arguments are @[dest, expected, new]@. + -- Sequentially consistent. + -- Possible future refactoring: should this be an'MO_AtomicRMW' variant? | MO_Cmpxchg Width - -- Should be an AtomicRMW variant eventually. - -- Sequential consistent. + -- | Atomic swap. Arguments are @[dest, new]@ | MO_Xchg Width -- These rts provided functions are special: suspendThread releases the -- cgit v1.2.1