diff options
author | Olivier Hainque <hainque@adacore.com> | 2018-05-31 10:46:58 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-05-31 10:46:58 +0000 |
commit | c9f357688263239dee41cef4762f0ad78c1bb442 (patch) | |
tree | f46cf7026acbf95290b94b8b0054d1954f26f7b7 /gcc/ada/libgnat | |
parent | 1b6f8e9778b58e190f40a1137eaba618c529110f (diff) | |
download | gcc-c9f357688263239dee41cef4762f0ad78c1bb442.zip gcc-c9f357688263239dee41cef4762f0ad78c1bb442.tar.gz gcc-c9f357688263239dee41cef4762f0ad78c1bb442.tar.bz2 |
[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
Diffstat (limited to 'gcc/ada/libgnat')
-rw-r--r-- | gcc/ada/libgnat/s-atopri.ads | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/gcc/ada/libgnat/s-atopri.ads b/gcc/ada/libgnat/s-atopri.ads index d249ec2..5cb1546 100644 --- a/gcc/ada/libgnat/s-atopri.ads +++ b/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 -- -------------------------- |