Commit c9f35768 by Olivier Hainque Committed by Pierre-Marie de Rodat

[Ada] Update comment on __atomic_compare_exchange in s-atomic_primitives

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.

2018-05-31  Olivier Hainque  <hainque@adacore.com>

gcc/ada/

	* libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
	builtins.

From-SVN: r261008
parent 1b6f8e97
2018-05-31 Olivier Hainque <hainque@adacore.com>
* libgnat/s-atopri.ads: Update comment on __atomic_compare_exchange
builtins.
2018-05-31 Eric Botcazou <ebotcazou@adacore.com> 2018-05-31 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Call_to_gnu): If this is a function call and * gcc-interface/trans.c (Call_to_gnu): If this is a function call and
......
...@@ -92,18 +92,6 @@ package System.Atomic_Primitives is ...@@ -92,18 +92,6 @@ package System.Atomic_Primitives is
Sync_Compare_And_Swap_8, Sync_Compare_And_Swap_8,
"__sync_val_compare_and_swap_1"); "__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 function Sync_Compare_And_Swap_16
(Ptr : Address; (Ptr : Address;
Expected : uint16; Expected : uint16;
...@@ -128,6 +116,20 @@ package System.Atomic_Primitives is ...@@ -128,6 +116,20 @@ package System.Atomic_Primitives is
Sync_Compare_And_Swap_64, Sync_Compare_And_Swap_64,
"__sync_val_compare_and_swap_8"); "__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 -- -- Lock-free operations --
-------------------------- --------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment