]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[Ada] Document requirements for Pragma Lock_Free
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:47:58 +0000 (09:47 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 20 Aug 2019 09:47:58 +0000 (09:47 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274717 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/doc/gnat_rm/implementation_defined_pragmas.rst
gcc/ada/gnat_rm.texi

index 8485a9c0d09503e8b0742fa27fe5fd1021e32b50..a6f680c9ea7bff1b803fb9ebb1aa214286fb99f9 100644 (file)
@@ -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
index a4ff222e146605582a39a0f3dbb72bed961700ef..baa13fce0dd81df1ebca3a9f05bc17876676de0d 100644 (file)
@@ -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
 =====================
 
index be31ed89584b0df2b829bfb5630a9ae5cdf0ea80..3c561ed1b04414dae3eb30edb1d0123e24dd0022 100644 (file)
@@ -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