aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2019-08-20 09:47:58 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-08-20 09:47:58 +0000
commit2beee64ae080305808720f839b6ca7bc280aed74 (patch)
treec9106a21d9b6bfc8d1b48148a453f1287fbcd8ec /gcc
parentfdacd614f4162311af0e60a02e6ff6b47ba809a5 (diff)
downloadgcc-2beee64ae080305808720f839b6ca7bc280aed74.zip
gcc-2beee64ae080305808720f839b6ca7bc280aed74.tar.gz
gcc-2beee64ae080305808720f839b6ca7bc280aed74.tar.bz2
[Ada] Document requirements for Pragma Lock_Free
2019-08-20 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst: Document requirements for Pragma Lock_Free. * gnat_rm.texi: Regenerate. From-SVN: r274717
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst18
-rw-r--r--gcc/ada/gnat_rm.texi41
3 files changed, 65 insertions, 0 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8485a9c..a6f680c 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2019-08-20 Arnaud Charlet <charlet@adacore.com>
+
+ * doc/gnat_rm/implementation_defined_pragmas.rst: Document
+ requirements for Pragma Lock_Free.
+ * gnat_rm.texi: Regenerate.
+
2019-08-20 Philippe Gil <gil@adacore.com>
* bindgen.adb (Gen_Main): Set gnat_argc/gnat_argv to argc/argv
diff --git a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
index a4ff222..baa13fc 100644
--- a/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
@@ -3649,6 +3649,24 @@ the implementation of protected operations must be implemented without locks.
Compilation fails if the compiler cannot generate lock-free code for the
operations.
+The current conditions required to support this pragma are:
+
+* Protected type declarations may not contain entries
+* Protected subprogram declarations may not have nonelementary parameters
+
+In addition, each protected subprogram body must satisfy:
+
+* May reference only one protected component
+* May not reference nonconstant entities outside the protected subprogram
+ scope.
+* May not contain address representation items, allocators, or quantified
+ expressions.
+* May not contain delay, goto, loop, or procedure-call statements.
+* May not contain exported and imported entities
+* May not dereferenced access values
+* Function calls and attribute references must be static
+
+
Pragma Loop_Invariant
=====================
diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi
index be31ed8..3c561ed 100644
--- a/gcc/ada/gnat_rm.texi
+++ b/gcc/ada/gnat_rm.texi
@@ -5115,6 +5115,47 @@ the implementation of protected operations must be implemented without locks.
Compilation fails if the compiler cannot generate lock-free code for the
operations.
+The current conditions required to support this pragma are:
+
+
+@itemize *
+
+@item
+Protected type declarations may not contain entries
+
+@item
+Protected subprogram declarations may not have nonelementary parameters
+@end itemize
+
+In addition, each protected subprogram body must satisfy:
+
+
+@itemize *
+
+@item
+May reference only one protected component
+
+@item
+May not reference nonconstant entities outside the protected subprogram
+scope.
+
+@item
+May not contain address representation items, allocators, or quantified
+expressions.
+
+@item
+May not contain delay, goto, loop, or procedure-call statements.
+
+@item
+May not contain exported and imported entities
+
+@item
+May not dereferenced access values
+
+@item
+Function calls and attribute references must be static
+@end itemize
+
@node Pragma Loop_Invariant,Pragma Loop_Optimize,Pragma Lock_Free,Implementation Defined Pragmas
@anchor{gnat_rm/implementation_defined_pragmas pragma-loop-invariant}@anchor{98}
@section Pragma Loop_Invariant