Remove mention of unavailability, long obsolete, and reword suggestion of use
to indicate that we might want to switch to an internal interface using them.
The current wording suggests just that we should bind the current
Sync_Compare_And_Swap Ada subprograms to __atomic_compare builtins instead of
__sync_compare, which would be highly confusing.
Tested on x86_64-pc-linux-gnu, committed on trunk
2018-05-31 Olivier Hainque <hain...@adacore.com>
gcc/ada/
* libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
builtins.
--- gcc/ada/libgnat/s-atopri.ads
+++ gcc/ada/libgnat/s-atopri.ads
@@ -92,18 +92,6 @@ package System.Atomic_Primitives is
Sync_Compare_And_Swap_8,
"__sync_val_compare_and_swap_1");
- -- ??? Should use __atomic_compare_exchange_1 (doesn't work yet):
- -- function Sync_Compare_And_Swap_8
- -- (Ptr : Address;
- -- Expected : Address;
- -- Desired : uint8;
- -- Weak : Boolean := False;
- -- Success_Model : Mem_Model := Seq_Cst;
- -- Failure_Model : Mem_Model := Seq_Cst) return Boolean;
- -- pragma Import (Intrinsic,
- -- Sync_Compare_And_Swap_8,
- -- "__atomic_compare_exchange_1");
-
function Sync_Compare_And_Swap_16
(Ptr : Address;
Expected : uint16;
@@ -128,6 +116,20 @@ package System.Atomic_Primitives is
Sync_Compare_And_Swap_64,
"__sync_val_compare_and_swap_8");
+ -- ??? We might want to switch to the __atomic series of builtins for
+ -- compare-and-swap operations at some point.
+
+ -- function Atomic_Compare_Exchange_8
+ -- (Ptr : Address;
+ -- Expected : Address;
+ -- Desired : uint8;
+ -- Weak : Boolean := False;
+ -- Success_Model : Mem_Model := Seq_Cst;
+ -- Failure_Model : Mem_Model := Seq_Cst) return Boolean;
+ -- pragma Import (Intrinsic,
+ -- Atomic_Compare_Exchange_8,
+ -- "__atomic_compare_exchange_1");
+
--------------------------
-- Lock-free operations --
--------------------------