Version 1.1 of acs/ac-00242.txt
!standard 6.1.1(34/3) 13-01-08 AC95-00242/00
!standard D.3(12)
!class Amendment 13-01-08
!status received no action 13-01-08
!status received 12-11-03
!subject Active priority in a preconditon of a protected subprogram
!summary
!appendix
!topic Active priority in a precondition of a protected subprogram
!reference Ada 2012 RM D.1(15), D.3 (12), 6.1.1 (34/3)
!from Brad Moore 12-09-03
!keywords Priority Protected Precondition
According to the RM, one cannot determine the active priority of a
task in a precondition for a protected subprogram in a portable manner,
as it is implementation defined whether preconditions checks are
performed before or after starting a protected action.
D.3 (12) Says, "While a task executes a protected action, it inherits
the ceiling priority of the corresponding protected object."
6.1.1 (34/3) Says, "It is not specified whether in a call on a protected
operation, the checks are performed before or after starting the
protected action."
Consider:
protected type T (Priority : System.Priority := System.Default_Priority)
with Priority => Priority is
-- Behavior Non-portable according to 6.1.1 (34/4).
-- Has the base priority been elevated to the ceiling priority
-- for the precondition?
procedure Foo
with Pre => Ada.Dynamic_Priorities.Get_Priority = Priority;
end T;
Should the active priority within the precondition be well-defined?
***************************************************************
From: Tucker Taft
Sent: Sunday, November 4, 2012 9:03 AM
> According to the RM, one cannot determine the active priority of a
> task in a precondition for a protected subprogram in a portable
> manner, as it is implementation defined whether preconditions checks
> are performed before or after starting a protected action. ...
But as mentioned in my response to your prior comment, Get_Priority always
returns the base priority, so I don't see the issue.
***************************************************************
From: Brad Moore
Sent: Sunday, November 4, 2012 11:07 AM
You're right. This second comment is a non-issue and can be closed.
The first comment is still an issue.
***************************************************************
Questions? Ask the ACAA Technical Agent