aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc/gnat_rm
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2024-11-10 06:39:57 -0500
committerMarc Poulhiès <dkm@gcc.gnu.org>2024-11-18 15:06:55 +0100
commit4e23ce507067b04865342bb1a22a3651caaf28bc (patch)
tree5e5fa43951a7964b11f7fe9bf5059e6cbe1a41ab /gcc/ada/doc/gnat_rm
parent70faad19613748c7894afafac2703d7aa856a7c6 (diff)
downloadgcc-4e23ce507067b04865342bb1a22a3651caaf28bc.zip
gcc-4e23ce507067b04865342bb1a22a3651caaf28bc.tar.gz
gcc-4e23ce507067b04865342bb1a22a3651caaf28bc.tar.bz2
ada: Atomic_Synchronization is not a user-visible check
Remove all user-level documentation of the check name "Atomic_Synchronization". The documentation was confusing because this check should never be used in source code, and because it raises the question of whether All_Checks applies to it (it does not). Change the name Atomic_Synchronization to be _Atomic_Synchronization (with a leading underscore) so that it cannot be used in source code. This "check" is not really a check at all; it is used only internally in the implementation of Disable/Enable_Atomic_Synchronization, because the placement and scope of these pragmas match pragma Suppress. gcc/ada/ChangeLog: * doc/gnat_rm/implementation_defined_characteristics.rst: Remove Atomic_Synchronization. * doc/gnat_ugn/building_executable_programs_with_gnat.rst: Likewise. * doc/gnat_rm/implementation_defined_pragmas.rst: DRY. Consolidate documentation of Disable/Enable_Atomic_Synchronization. * checks.adb: Comment fix. * exp_util.ads: Likewise. * targparm.ads: Likewise. * types.ads: Likewise. * gnat1drv.adb: Likewise. DRY. * sem_prag.adb (Process_Disable_Enable_Atomic_Sync): Change name of Atomic_Synchronization to start with underscore. (Process_Suppress_Unsuppress): No need to check Comes_From_Source for Atomic_Synchronization anymore; _Atomic_Synchronization can never come from source. (Anyway, it shouldn't be ignored; it should be an error.) * snames.ads-tmpl (Atomic_Synchronization): Change name to start with underscore. * switch-c.adb (Scan_Front_End_Switches): Minor cleanup: Use 'in'. * gnat_rm.texi: Regenerate. * gnat_ugn.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc/gnat_rm')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst12
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst35
2 files changed, 18 insertions, 29 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
index 5399bda..3e41899 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_characteristics.rst
@@ -478,12 +478,12 @@ via compiler switches such as "-gnata".
*
"Implementation-defined check names. See 11.5(27)."
-The implementation defined check names include Alignment_Check,
-Atomic_Synchronization, Container_Checks, Duplicated_Tag_Check,
-Predicate_Check, Raise_Check, Tampering_Check, and Validity_Check.
-In addition, a user program can add implementation-defined check
-names by means of the pragma Check_Name. See the description of
-pragma ``Suppress`` for full details.
+The implementation-defined check names include Alignment_Check,
+Container_Checks, Duplicated_Tag_Check, Predicate_Check,
+Raise_Check, Tampering_Check, and Validity_Check. In addition, a
+user program can add implementation-defined check names by means
+of the pragma Check_Name. See the description of pragma
+``Suppress`` for details.
*
"Existence and meaning of second parameter of pragma Unsuppress.
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 7ff94c4..61ed40e 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -1662,18 +1662,20 @@ Syntax:
pragma Disable_Atomic_Synchronization [(Entity)];
+ pragma Enable_Atomic_Synchronization [(Entity)];
Ada requires that accesses (reads or writes) of an atomic variable be
regarded as synchronization points in the case of multiple tasks.
Particularly in the case of multi-processors this may require special
-handling, e.g. the generation of memory barriers. This capability may
-be turned off using this pragma in cases where it is known not to be
-required.
-
-The placement and scope rules for this pragma are the same as those
-for ``pragma Suppress``. In particular it can be used as a
-configuration pragma, or in a declaration sequence where it applies
-till the end of the scope. If an ``Entity`` argument is present,
+handling, e.g. the generation of memory barriers. This synchronization
+is performed by default, but can be turned off using pragma
+``Disable_Atomic_Synchronization``.
+The ``Enable_Atomic_Synchronization`` pragma turns it back on.
+
+The placement and scope rules for these pragmas are the same as those
+for ``pragma Suppress``. In particular they can be used as
+configuration pragmas, or in a declaration sequence where they apply
+until the end of the scope. If an ``Entity`` argument is present,
the action applies only to that entity.
Pragma Dispatching_Domain
@@ -1903,21 +1905,8 @@ Syntax:
pragma Enable_Atomic_Synchronization [(Entity)];
-
-Ada requires that accesses (reads or writes) of an atomic variable be
-regarded as synchronization points in the case of multiple tasks.
-Particularly in the case of multi-processors this may require special
-handling, e.g. the generation of memory barriers. This synchronization
-is performed by default, but can be turned off using
-``pragma Disable_Atomic_Synchronization``. The
-``Enable_Atomic_Synchronization`` pragma can be used to turn
-it back on.
-
-The placement and scope rules for this pragma are the same as those
-for ``pragma Unsuppress``. In particular it can be used as a
-configuration pragma, or in a declaration sequence where it applies
-till the end of the scope. If an ``Entity`` argument is present,
-the action applies only to that entity.
+Reenables atomic synchronization; see ``pragma Disable_Atomic_Synchronization``
+for details.
Pragma Exceptional_Cases
========================