CVS difference for ais/ai-00121.txt

Differences between 1.5 and version 1.6
Log of other versions for file ais/ai-00121.txt

--- ais/ai-00121.txt	2000/06/20 04:22:43	1.5
+++ ais/ai-00121.txt	2000/07/13 04:31:28	1.6
@@ -12,7 +12,7 @@
 !priority High
 !difficulty Hard
 !qualifier Clarification
-!subject Pragma Attach_Handler on Nested Objects
+!subject Pragma Attach_Handler on nested objects
 
 !summary
 
@@ -28,33 +28,37 @@
 
 C.3.1(7-8) says:
 
-  7   The Attach_Handler pragma is only allowed immediately within the
+  The Attach_Handler pragma is only allowed immediately within the
   protected_definition where the corresponding subprogram is declared.  The
   corresponding protected_type_declaration or single_protected_declaration
   shall be a library level declaration.
 
-    7.a   Discussion:  In the case of a protected_type_declaration, an
-    object_declaration of an object of that type need not be at library
-    level.
-
-  8   The Interrupt_Handler pragma is only allowed immediately within a
+  The Interrupt_Handler pragma is only allowed immediately within a
   protected_definition.  The corresponding protected_type_declaration shall be
   a library level declaration.  In addition, any object_declaration of such a
   type shall be a library level declaration.
 
+The AARM C.3.1(7.a) adds:
+
+    Discussion: In the case of a protected_type_declaration, an
+    object_declaration of an object of that type need not be at library
+    level.
+
 Thus, nested objects are not allowed in the Interrupt_Handler case, but
 they are allowed in the Attach_Handler case.
 
 C.3.1(12) says:
 
-  12   {finalization (of a protected object)} When a protected object is
+  When a protected object is
   finalized, for any of its procedures that are attached to interrupts, the
   handler is detached.  If the handler was attached by a procedure in the
   Interrupts package or if no user handler was previously attached to the
-  interrupt, the default treatment is restored.  Otherwise, [that is, if an
-  Attach_Handler pragma was used,] the previous handler is restored.
+  interrupt, the default treatment is restored.  Otherwise, that is, if an
+  Attach_Handler pragma was used, the previous handler is restored.
+
+and the AARM C.3.1(12.a) adds:
 
-    12.a   Discussion:  Since only library-level protected procedures can
+    Discussion:  Since only library-level protected procedures can
     be attached as handlers using the Interrupts package, the
     finalization discussed above occurs only as part of the finalization
     of all library-level packages in a partition.
@@ -85,9 +89,10 @@
 Several options exist:
 
 Option 1: require every protected object with an Attach_Handler pragma
-to be at library level.  This is clearly not what the RM says.  It
+to be at library level.  This is clearly not what the standard says.  It
 doesn't completely solve the problem, either -- one could create two
-objects on the heap, and Unchecked_Deallocate them in a non-LIFO order.
+objects on the heap, and call an instance of Unchecked_Deallocation on them
+in a non-LIFO order.
 
 Option 2: define "previous handler" to be "the handler that was attached
 at the time the protected object was initialized".  If that handler no

Questions? Ask the ACAA Technical Agent