aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorSteve Baird <baird@adacore.com>2022-08-25 14:56:55 -0700
committerMarc Poulhiès <poulhies@adacore.com>2022-09-12 10:16:50 +0200
commit4a46f59cb360013e11591a1e0d4cdc09f4b7dee1 (patch)
tree61cdc0621ee774861853706fb397e7aafedfe103 /gcc/ada/doc
parentde01e1b86a1095459883d15224aa195e6a3c71ff (diff)
downloadgcc-4a46f59cb360013e11591a1e0d4cdc09f4b7dee1.zip
gcc-4a46f59cb360013e11591a1e0d4cdc09f4b7dee1.tar.gz
gcc-4a46f59cb360013e11591a1e0d4cdc09f4b7dee1.tar.bz2
[Ada] Lock_Free aspect takes precedence over Ceiling_Locking locking policy
Allow the Lock_Free aspect of a protected type to be True (but only by explicit specification) if Ceiling_Locking locking policy has been specified. Clarify that the Lock_Free aspect takes precedence over the Ceiling_Locking policy in that case. gcc/ada/ * sem_ch9.adb (Satisfies_Lock_Free_Requirements): If Ceiling_Locking locking policy has been specified, then either return False (if Lock_Free was not explicitly specified) or generate a warning that ceiling locking will not be implemented for this protected unit (if Lock_Free was explicitly specified). Generate an error message (in addition to returning False) if an explicit Lock_Free aspect specification is rejected because atomic primitives are not supported on the given target. * doc/gnat_rm/implementation_defined_pragmas.rst: Clarify that the Lock_Free aspect for a protected unit takes precedence over the Ceiling_Locking locking policy in the case where both apply. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index 623949e..1d3a99d 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -3752,7 +3752,12 @@ In addition, each protected subprogram body must satisfy:
* May not dereferenced access values
* Function calls and attribute references must be static
-
+If the Lock_Free aspect is specified to be True for a protected unit
+and the Ceiling_Locking locking policy is in effect, then the run-time
+actions associated with the Ceiling_Locking locking policy (described in
+Ada RM D.3) are not performed when a protected operation of the protected
+unit is executed.
+
Pragma Loop_Invariant
=====================